Sei sulla pagina 1di 40

About source code from OpenHardwareLib and SharpZipLib:

This product includes code licensed under the GNU General Public License, the GN
U Lesser General Public License, and/or certain other open source licenses. A co
mplete machine-readable copy of the source code corresponding to such code is av
ailable upon request. This offer is valid to anyone in receipt of this informati
on and shall expire three years following the date of the final distribution of
this product version by Hewlett-Packard Company.
To obtain such source code, send a check or money order in the amount of US $10.
00 to:
Hewlett-Packard Company
Attn: General Counsel
3000 Hanover Street
Palo Alto, CA 94394
USA
Please specify the product and version for which you are requesting source code.
You may also request a copy of this source code free of charge at http://www.hp.
com/software/opensource.

Notice for libraries:


- log4net
- crc32
http://www.apache.org/licenses/LICENSE-2.0.html
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distrib
ution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity. F
or the purposes of this definition, "control" means (i) the power, direct or ind
irect, to cause the direction or management of such entity, whether by contract
or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstandin
g shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permission
s granted by this License.
"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.

"Object" form shall mean any form resulting from mechanical transformation or tr
anslation of a Source form, including but not limited to compiled object code, g
enerated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is include
d in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that i
s based on (or derived from) the Work and for which the editorial revisions, ann
otations, elaborations, or other modifications represent, as a whole, an origina
l work of authorship. For the purposes of this License, Derivative Works shall n
ot include works that remain separable from, or merely link (or bind by name) to
the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition, "submitte
d" means any form of electronic, verbal, or written communication sent to the Li
censor or its representatives, including but not limited to communication on ele
ctronic mailing lists, source code control systems, and issue tracking systems t
hat are managed by, or on behalf of, the Licensor for the purpose of discussing
and improving the Work, but excluding communication that is conspicuously marked
or otherwise designated in writing by the copyright owner as "Not a Contributio
n."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf o
f whom a Contribution has been received by Licensor and subsequently incorporate
d within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this Licen
se, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable copyright license to reproduce, prepare De
rivative Works of, publicly display, publicly perform, sublicense, and distribut
e the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License,
each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no
-charge, royalty-free, irrevocable (except as stated in this section) patent lic
ense to make, have made, use, offer to sell, sell, import, and otherwise transfe
r the Work, where such license applies only to those patent claims licensable by
such Contributor that are necessarily infringed by their Contribution(s) alone
or by combination of their Contribution(s) with the Work to which such Contribut
ion(s) was submitted. If You institute patent litigation against any entity (inc
luding a cross-claim or counterclaim in a lawsuit) alleging that the Work or a C
ontribution incorporated within the Work constitutes direct or contributory pate
nt infringement, then any patent licenses granted to You under this License for
that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Deriva
tive Works thereof in any medium, with or without modifications, and in Source o
r Object form, provided that You meet the following conditions:
a.You must give any other recipients of the Work or Derivative Works a copy of t
his License; and
b.You must cause any modified files to carry prominent notices stating that You
changed the files; and
c.You must retain, in the Source form of any Derivative Works that You distribut

e, all copyright, patent, trademark, and attribution notices from the Source for
m of the Work, excluding those notices that do not pertain to any part of the De
rivative Works; and
d.If the Work includes a "NOTICE" text file as part of its distribution, then an
y Derivative Works that You distribute must include a readable copy of the attri
bution notices contained within such NOTICE file, excluding those notices that d
o not pertain to any part of the Derivative Works, in at least one of the follow
ing places: within a NOTICE text file distributed as part of the Derivative Work
s; within the Source form or documentation, if provided along with the Derivativ
e Works; or, within a display generated by the Derivative Works, if and wherever
such third-party notices normally appear. The contents of the NOTICE file are f
or informational purposes only and do not modify the License. You may add Your o
wn attribution notices within Derivative Works that You distribute, alongside or
as an addendum to the NOTICE text from the Work, provided that such additional
attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or d
istribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contr
ibution intentionally submitted for inclusion in the Work by You to the Licensor
shall be under the terms and conditions of this License, without any additional
terms or conditions. Notwithstanding the above, nothing herein shall supersede
or modify the terms of any separate license agreement you may have executed with
Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, tr
ademarks, service marks, or product names of the Licensor, except as required fo
r reasonable and customary use in describing the origin of the Work and reproduc
ing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in wri
ting, Licensor provides the Work (and each Contributor provides its Contribution
s) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either exp
ress or implied, including, without limitation, any warranties or conditions of
TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Y
ou are solely responsible for determining the appropriateness of using or redist
ributing the Work and assume any risks associated with Your exercise of permissi
ons under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in to
rt (including negligence), contract, or otherwise, unless required by applicable
law (such as deliberate and grossly negligent acts) or agreed to in writing, sh
all any Contributor be liable to You for damages, including any direct, indirect
, special, incidental, or consequential damages of any character arising as a re
sult of this License or out of the use or inability to use the Work (including b
ut not limited to damages for loss of goodwill, work stoppage, computer failure
or malfunction, or any and all other commercial damages or losses), even if such
Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or
Derivative Works thereof, You may choose to offer, and charge a fee for, accepta
nce of support, warranty, indemnity, or other liability obligations and/or right
s consistent with this License. However, in accepting such obligations, You may
act only on Your own behalf and on Your sole responsibility, not on behalf of an
y other Contributor, and only if You agree to indemnify, defend, and hold each C
ontributor harmless for any liability incurred by, or claims asserted against, s

uch Contributor by reason of your accepting any such warranty or additional liab
ility.
END OF TERMS AND CONDITIONS
Notice for libraries:
- sharpziplib
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share a
nd change it. By contrast, the GNU General Public License is intended to guarant
ee your freedom to share and change free software--to make sure the software is
free for all its users. This General Public License applies to most of the Free
Software Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by the GNU Le
sser General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our Gene
ral Public Licenses are designed to make sure that you have the freedom to distr
ibute copies of free software (and charge for this service if you wish), that yo
u receive source code or can get it if you want it, that you can change the soft
ware or use pieces of it in new free programs; and that you know you can do thes
e things.
To protect your rights, we need to make restrictions that forbid anyone to deny
you these rights or to ask you to surrender the rights. These restrictions trans
late to certain responsibilities for you if you distribute copies of the softwar
e, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a
fee, you must give the recipients all the rights that you have. You must make s
ure that they, too, receive or can get the source code. And you must show them t
hese terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer
you this license which gives you legal permission to copy, distribute and/or mo
dify the software.
Also, for each author's protection and ours, we want to make certain that everyo
ne understands that there is no warranty for this free software. If the software
is modified by someone else and passed on, we want its recipients to know that
what they have is not the original, so that any problems introduced by others wi
ll not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish
to avoid the danger that redistributors of a free program will individually obta

in patent licenses, in effect making the program proprietary. To prevent this, w


e have made it clear that any patent must be licensed for everyone's free use or
not licensed at all.
The precise terms and conditions for copying, distribution and modification foll
ow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice pla
ced by the copyright holder saying it may be distributed under the terms of this
General Public License. The "Program", below, refers to any such program or wor
k, and a "work based on the Program" means either the Program or any derivative
work under copyright law: that is to say, a work containing the Program or a por
tion of it, either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in the term
"modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by
this License; they are outside its scope. The act of running the Program is not
restricted, and the output from the Program is covered only if its contents cons
titute a work based on the Program (independent of having been made by running t
he Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as y
ou receive it, in any medium, provided that you conspicuously and appropriately
publish on each copy an appropriate copyright notice and disclaimer of warranty;
keep intact all the notices that refer to this License and to the absence of an
y warranty; and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at
your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus
forming a work based on the Program, and copy and distribute such modifications
or work under the terms of Section 1 above, provided that you also meet all of t
hese conditions:
a) You must cause the modified files to carry prominent notices stating that
you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or
in part contains or is derived from the Program or any part thereof, to be licen
sed as a whole at no charge to all third parties under the terms of this License
.
c) If the modified program normally reads commands interactively when run, y
ou must cause it, when started running for such interactive use in the most ordi
nary way, to print or display an announcement including an appropriate copyright
notice and a notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under these conditions,
and telling the user how to view a copy of this License. (Exception: if the Pro
gram itself is interactive but does not normally print such an announcement, you
r work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sectio
ns of that work are not derived from the Program, and can be reasonably consider
ed independent and separate works in themselves, then this License, and its term
s, do not apply to those sections when you distribute them as separate works. Bu
t when you distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of this Lice
nse, whose permissions for other licensees extend to the entire whole, and thus

to each and every part regardless of who wrote it.


Thus, it is not the intent of this section to claim rights or contest your right
s to work written entirely by you; rather, the intent is to exercise the right t
o control the distribution of derivative or collective works based on the Progra
m.
In addition, mere aggregation of another work not based on the Program with the
Program (or with a work based on the Program) on a volume of a storage or distri
bution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section
2) in object code or executable form under the terms of Sections 1 and 2 above
provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code
, which must be distributed under the terms of Sections 1 and 2 above on a mediu
m customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to giv
e any third party, for a charge no more than your cost of physically performing
source distribution, a complete machine-readable copy of the corresponding sourc
e code, to be distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distrib
ute corresponding source code. (This alternative is allowed only for noncommerci
al distribution and only if you received the program in object code or executabl
e form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modif
ications to it. For an executable work, complete source code means all the sourc
e code for all modules it contains, plus any associated interface definition fil
es, plus the scripts used to control compilation and installation of the executa
ble. However, as a special exception, the source code distributed need not inclu
de anything that is normally distributed (in either source or binary form) with
the major components (compiler, kernel, and so on) of the operating system on wh
ich the executable runs, unless that component itself accompanies the executable
.
If distribution of executable or object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the source code
from the same place counts as distribution of the source code, even though thir
d parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as exp
ressly provided under this License. Any attempt otherwise to copy, modify, subli
cense or distribute the Program is void, and will automatically terminate your r
ights under this License. However, parties who have received copies, or rights,
from you under this License will not have their licenses terminated so long as s
uch parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. Ho
wever, nothing else grants you permission to modify or distribute the Program or
its derivative works. These actions are prohibited by law if you do not accept
this License. Therefore, by modifying or distributing the Program (or any work b
ased on the Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying the Program
or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), th
e recipient automatically receives a license from the original licensor to copy,

distribute or modify the Program subject to these terms and conditions. You may
not impose any further restrictions on the recipients' exercise of the rights g
ranted herein. You are not responsible for enforcing compliance by third parties
to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement
or for any other reason (not limited to patent issues), conditions are imposed
on you (whether by court order, agreement or otherwise) that contradict the cond
itions of this License, they do not excuse you from the conditions of this Licen
se. If you cannot distribute so as to satisfy simultaneously your obligations un
der this License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent license would no
t permit royalty-free redistribution of the Program by all those who receive cop
ies directly or indirectly through you, then the only way you could satisfy both
it and this License would be to refrain entirely from distribution of the Progr
am.
If any portion of this section is held invalid or unenforceable under any partic
ular circumstance, the balance of the section is intended to apply and the secti
on as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or o
ther property right claims or to contest validity of any such claims; this secti
on has the sole purpose of protecting the integrity of the free software distrib
ution system, which is implemented by public license practices. Many people have
made generous contributions to the wide range of software distributed through t
hat system in reliance on consistent application of that system; it is up to the
author/donor to decide if he or she is willing to distribute software through a
ny other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a conse
quence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countr
ies either by patents or by copyrighted interfaces, the original copyright holde
r who places the Program under this License may add an explicit geographical dis
tribution limitation excluding those countries, so that distribution is permitte
d only in or among countries not thus excluded. In such case, this License incor
porates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the G
eneral Public License from time to time. Such new versions will be similar in sp
irit to the present version, but may differ in detail to address new problems or
concerns.
Each version is given a distinguishing version number. If the Program specifies
a version number of this License which applies to it and "any later version", yo
u have the option of following the terms and conditions either of that version o
r of any later version published by the Free Software Foundation. If the Program
does not specify a version number of this License, you may choose any version e
ver published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs who
se distribution conditions are different, write to the author to ask for permiss
ion. For software which is copyrighted by the Free Software Foundation, write to
the Free Software Foundation; we sometimes make exceptions for this. Our decisi
on will be guided by the two goals of preserving the free status of all derivati
ves of our free software and of promoting the sharing and reuse of software gene
rally.

NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE
PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATE
D IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS
IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NO
T LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTIC
ULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM I
S WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECES
SARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL A
NY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE P
ROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY
TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING REN
DERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY
HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Notice for licenses
- OpenHardwareLib
http://www.mozilla.org/MPL/2.0/
Mozilla Public License
Version 2.0
1. Definitions
1.1. Contributor
means each individual or legal entity that creates, contributes to the creat
ion of, or owns Covered Software.
1.2. Contributor Version
means the combination of the Contributions of others (if any) used by a Cont
ributor and that particular Contributors Contribution.
1.3. Contribution
means Covered Software of a particular Contributor.
1.4. Covered Software
means Source Code Form to which the initial Contributor has attached the not
ice in Exhibit A, the Executable Form of such Source Code Form, and Modification
s of such Source Code Form, in each case including portions thereof.
1.5. Incompatible With Secondary Licenses
means
that the initial Contributor has attached the notice described in Exhibi
t B to the Covered Software; or
that the Covered Software was made available under the terms of version
1.1 or earlier of the License, but not also under the terms of a Secondary Licen
se.
1.6. Executable Form

means any form of the work other than Source Code Form.
1.7. Larger Work
means a work that combines Covered Software with other material, in a separa
te file or files, that is not Covered Software.
1.8. License
means this document.
1.9. Licensable
means having the right to grant, to the maximum extent possible, whether at
the time of the initial grant or subsequently, any and all of the rights conveye
d by this License.
1.10. Modifications
means any of the following:
any file in Source Code Form that results from an addition to, deletion
from, or modification of the contents of Covered Software; or
any new file in Source Code Form that contains any Covered Software.
1.11. Patent Claims of a Contributor
means any patent claim(s), including without limitation, method, process, an
d apparatus claims, in any patent Licensable by such Contributor that would be i
nfringed, but for the grant of the License, by the making, using, selling, offer
ing for sale, having made, import, or transfer of either its Contributions or it
s Contributor Version.
1.12. Secondary License
means either the GNU General Public License, Version 2.0, the GNU Lesser Gen
eral Public License, Version 2.1, the GNU Affero General Public License, Version
3.0, or any later versions of those licenses.
1.13. Source Code Form
means the form of the work preferred for making modifications.
1.14. You (or Your)
means an individual or a legal entity exercising rights under this License.
For legal entities, You includes any entity that controls, is controlled by, or is
under common control with You. For purposes of this definition, control means (a)
the power, direct or indirect, to cause the direction or management of such ent
ity, whether by contract or otherwise, or (b) ownership of more than fifty perce
nt (50%) of the outstanding shares or beneficial ownership of such entity.
2. License Grants and Conditions
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive lic
ense:
under intellectual property rights (other than patent or trademark) Licensab
le by such Contributor to use, reproduce, make available, modify, display, perfo
rm, distribute, and otherwise exploit its Contributions, either on an unmodified
basis, with Modifications, or as part of a Larger Work; and
under Patent Claims of such Contributor to make, use, sell, offer for sale,
have made, import, and otherwise transfer either its Contributions or its Contri
butor Version.

2.2. Effective Date


The licenses granted in Section 2.1 with respect to any Contribution become effe
ctive for each Contribution on the date the Contributor first distributes such C
ontribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under this Li
cense. No additional rights or licenses will be implied from the distribution or
licensing of Covered Software under this License. Notwithstanding Section 2.1(b
) above, no patent license is granted by a Contributor:
for any code that a Contributor has removed from Covered Software; or
for infringements caused by: (i) Your and any other third partys modification
s of Covered Software, or (ii) the combination of its Contributions with other s
oftware (except as part of its Contributor Version); or
under Patent Claims infringed by Covered Software in the absence of its Cont
ributions.
This License does not grant any rights in the trademarks, service marks, or logo
s of any Contributor (except as may be necessary to comply with the notice requi
rements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to distribute
the Covered Software under a subsequent version of this License (see Section 10.
2) or under the terms of a Secondary License (if permitted under the terms of Se
ction 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its Contributions are
its original creation(s) or it has sufficient rights to grant the rights to its
Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under applicable copyr
ight doctrines of fair use, fair dealing, or other equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Sectio
n 2.1.
3. Responsibilities
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any Modifica
tions that You create or to which You contribute, must be under the terms of thi
s License. You must inform recipients that the Source Code Form of the Covered S
oftware is governed by the terms of this License, and how they can obtain a copy
of this License. You may not attempt to alter or restrict the recipients rights
in the Source Code Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
such Covered Software must also be made available in Source Code Form, as de
scribed in Section 3.1, and You must inform recipients of the Executable Form ho
w they can obtain a copy of such Source Code Form by reasonable means in a timel

y manner, at a charge no more than the cost of distribution to the recipient; an


d
You may distribute such Executable Form under the terms of this License, or
sublicense it under different terms, provided that the license for the Executabl
e Form does not attempt to limit or alter the recipients rights in the Source Cod
e Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice, provided
that You also comply with the requirements of this License for the Covered Soft
ware. If the Larger Work is a combination of Covered Software with a work govern
ed by one or more Secondary Licenses, and the Covered Software is not Incompatib
le With Secondary Licenses, this License permits You to additionally distribute
such Covered Software under the terms of such Secondary License(s), so that the
recipient of the Larger Work may, at their option, further distribute the Covere
d Software under the terms of either this License or such Secondary License(s).
3.4. Notices
You may not remove or alter the substance of any license notices (including copy
right notices, patent notices, disclaimers of warranty, or limitations of liabil
ity) contained within the Source Code Form of the Covered Software, except that
You may alter any license notices to the extent required to remedy known factual
inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support, indemnity o
r liability obligations to one or more recipients of Covered Software. However,
You may do so only on Your own behalf, and not on behalf of any Contributor. You
must make it absolutely clear that any such warranty, support, indemnity, or li
ability obligation is offered by You alone, and You hereby agree to indemnify ev
ery Contributor for any liability incurred by such Contributor as a result of wa
rranty, support, indemnity or liability terms You offer. You may include additio
nal disclaimers of warranty and limitations of liability specific to any jurisdi
ction.
4. Inability to Comply Due to Statute or Regulation
If it is impossible for You to comply with any of the terms of this License with
respect to some or all of the Covered Software due to statute, judicial order,
or regulation then You must: (a) comply with the terms of this License to the ma
ximum extent possible; and (b) describe the limitations and the code they affect
. Such description must be placed in a text file included with all distributions
of the Covered Software under this License. Except to the extent prohibited by
statute or regulation, such description must be sufficiently detailed for a reci
pient of ordinary skill to be able to understand it.
5. Termination
5.1. The rights granted under this License will terminate automatically if You f
ail to comply with any of its terms. However, if You become compliant, then the
rights granted under this License from a particular Contributor are reinstated (
a) provisionally, unless and until such Contributor explicitly and finally termi
nates Your grants, and (b) on an ongoing basis, if such Contributor fails to not
ify You of the non-compliance by some reasonable means prior to 60 days after Yo
u have come back into compliance. Moreover, Your grants from a particular Contri
butor are reinstated on an ongoing basis if such Contributor notifies You of the
non-compliance by some reasonable means, this is the first time You have receiv
ed notice of non-compliance with this License from such Contributor, and You bec
ome compliant prior to 30 days after Your receipt of the notice.

5.2. If You initiate litigation against any entity by asserting a patent infring
ement claim (excluding declaratory judgment actions, counter-claims, and cross-c
laims) alleging that a Contributor Version directly or indirectly infringes any
patent, then the rights granted to You by any and all Contributors for the Cover
ed Software under Section 2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user l
icense agreements (excluding distributors and resellers) which have been validly
granted by You or Your distributors under this License prior to termination sha
ll survive termination.
6. Disclaimer of Warranty
Covered Software is provided under this License on an as is basis, without warrant
y of any kind, either expressed, implied, or statutory, including, without limit
ation, warranties that the Covered Software is free of defects, merchantable, fi
t for a particular purpose or non-infringing. The entire risk as to the quality
and performance of the Covered Software is with You. Should any Covered Software
prove defective in any respect, You (not any Contributor) assume the cost of an
y necessary servicing, repair, or correction. This disclaimer of warranty consti
tutes an essential part of this License. No use of any Covered Software is autho
rized under this License except under this disclaimer.
7. Limitation of Liability
Under no circumstances and under no legal theory, whether tort (including neglig
ence), contract, or otherwise, shall any Contributor, or anyone who distributes
Covered Software as permitted above, be liable to You for any direct, indirect,
special, incidental, or consequential damages of any character including, withou
t limitation, damages for lost profits, loss of goodwill, work stoppage, compute
r failure or malfunction, or any and all other commercial damages or losses, eve
n if such party shall have been informed of the possibility of such damages. Thi
s limitation of liability shall not apply to liability for death or personal inj
ury resulting from such partys negligence to the extent applicable law prohibits
such limitation. Some jurisdictions do not allow the exclusion or limitation of
incidental or consequential damages, so this exclusion and limitation may not ap
ply to You.
8. Litigation
Any litigation relating to this License may be brought only in the courts of a j
urisdiction where the defendant maintains its principal place of business and su
ch litigation shall be governed by laws of that jurisdiction, without reference
to its conflict-of-law provisions. Nothing in this Section shall prevent a partys
ability to bring cross-claims or counter-claims.
9. Miscellaneous
This License represents the complete agreement concerning the subject matter her
eof. If any provision of this License is held to be unenforceable, such provisio
n shall be reformed only to the extent necessary to make it enforceable. Any law
or regulation which provides that the language of a contract shall be construed
against the drafter shall not be used to construe this License against a Contri
butor.
10. Versions of the License
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section 10.3, n
o one other than the license steward has the right to modify or publish new vers
ions of this License. Each version will be given a distinguishing version number
.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version of the Li

cense under which You originally received the Covered Software, or under the ter
ms of any subsequent version published by the license steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to create a ne
w license for such software, you may create and use a modified version of this L
icense if you rename the license and remove any references to the name of the li
cense steward (except to note that such modified license differs from this Licen
se).
10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
If You choose to distribute Source Code Form that is Incompatible With Secondary
Licenses under the terms of this version of the License, the notice described i
n Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain
one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular file, then
You may include the notice in a location (such as a LICENSE file in a relevant d
irectory) where a recipient would be likely to look for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - Incompatible With Secondary Licenses Notice
This Source Code Form is Incompatible With Secondary Licenses, as defined by t
he Mozilla Public License, v. 2.0.
Notice for libraries:
- aga.controls and WinRing0 from OpenHardwareLib
http://opensource.org/licenses/BSD-2-Clause
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this l
ist of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, thi
s list of conditions and the following disclaimer in the documentation and/or ot
her materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WA
RRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT
, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, D
ATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF L
IABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE O
R OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
Notice for libraries:
- json.NET

ManagedWifiAPI
ManagedTaskScheduler
OxyPlot
jQuery and Knockout from OpenHardwareLib

http://opensource.org/licenses/MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Notice for libraries:
- AWS SDK for .NET
https://aws.amazon.com/asl/
Amazon Software License
1. Definitions
Licensor means any person or entity that distributes its Work.
Software means the original work of authorship made available under this License.
Work means the Software and any additions to or derivative works of the Software t
hat are made available under this License.

The terms reproduce, reproduction, derivative works, and distribution have the meanin
s provided under U.S. copyright law; provided, however, that for the purposes of
this License, derivative works shall not include works that remain separable fr
om, or merely link (or bind by name) to the interfaces of, the Work.
Works, including the Software, are made available under this License by including
in or with the Work either (a) a copyright notice referencing the applicability
of this License to the Work, or (b) a copy of this License.
2. License Grants
2.1 Copyright Grant. Subject to the terms and conditions of this License, each L
icensor grants to you a perpetual, worldwide, non-exclusive, royalty-free, copyr
ight license to reproduce, prepare derivative works of, publicly display, public
ly perform, sublicense and distribute its Work and any resulting derivative work
s in any form.
2.2 Patent Grant. Subject to the terms and conditions of this License, each Lice

nsor grants to you a perpetual, worldwide, non-exclusive, royalty-free patent li


cense to make, have made, use, sell, offer for sale, import, and otherwise trans
fer its Work, in whole or in part. The foregoing license applies only to the pat
ent claims licensable by Licensor that would be infringed by Licensors Work (or p
ortion thereof) individually and excluding any combinations with any other mater
ials or technology.
3. Limitations
3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do
so under this License, (b) you include a complete copy of this License with your
distribution, and (c) you retain without modification any copyright, patent, tr
ademark, or attribution notices that are present in the Work.
3.2 Derivative Works. You may specify that additional or different terms apply t
o the use, reproduction, and distribution of your derivative works of the Work (Y
our Terms) only if (a) Your Terms provide that the use limitation in Section 3.3
applies to your derivative works, and (b) you identify the specific derivative w
orks that are subject to Your Terms. Notwithstanding Your Terms, this License (i
ncluding the redistribution requirements in Section 3.1) will continue to apply
to the Work itself.
3.3 Use Limitation. The Work and any derivative works thereof only may be used o
r intended for use with the web services, computing platforms or applications pr
ovided by Amazon.com, Inc. or its affiliates, including Amazon Web Services, Inc
.
3.4 Patent Claims. If you bring or threaten to bring a patent claim against
Licensor (including any claim, cross-claim or counterclaim in a lawsuit) to
rce any patents that you allege are infringed by any Work, then your rights
r this License from such Licensor (including the grants in Sections 2.1 and
will terminate immediately.

any
enfo
unde
2.2)

3.5 Trademarks. This License does not grant any rights to use any Licensors or it
s affiliates names, logos, or trademarks, except as necessary to reproduce the no
tices described in this License.
3.6 Termination. If you violate any term of this License, then your rights under
this License (including the grants in Sections 2.1 and 2.2) will terminate imme
diately.
4. Disclaimer of Warranty.
THE WORK IS PROVIDED AS IS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EX
PRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF M ERCHANTABILITY, FITNES
S FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDE
RTAKING ANY ACTIVITIES UNDER THIS LICENSE. SOME STATES CONSUMER LAWS DO NOT ALLOW
EXCLUSION OF AN IMPLIED WARRANTY, SO THIS DISCLAIMER MAY NOT APPLY TO YOU.
5. Limitation of Liability.
EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL THEORY, W
HETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE SHALL ANY LICENSOR
BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENT
AL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATED TO THIS LICENSE, THE USE
OR INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO LOSS OF GOODWILL, BUS
INESS INTERRUPTION, LOST PROFITS OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR AN
Y OTHER COMM ERCIAL DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF
THE POSSIBILITY OF SUCH DAMAGES.
Notice for libraries:

- Snappy.NET
BSD license
This license covers the Windows port of Snappy (all C++ and .NET code) as well a
s the upstream Snappy. It is standard BSD license.
Copyright (c) 2011 - 2014 Robert Vaan, Google Inc.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this li
st of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
Neither the name of Robert Vaan nor the names of contributors may be used to endor
se or promote products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRAN
TIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, IN
DIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABI
LITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OT
HERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
WuCompat V1
PCI\VEN_8086&DEV_2776
PCI\VEN_8086&DEV_27A6
PCI\VEN_8086&DEV_2973
PCI\VEN_8086&DEV_2983
PCI\VEN_8086&DEV_2993
PCI\VEN_8086&DEV_29A3
PCI\VEN_8086&DEV_29B3
PCI\VEN_8086&DEV_29C3
PCI\VEN_8086&DEV_29D3
PCI\VEN_8086&DEV_2A03
PCI\VEN_8086&DEV_2A13
PCI\VEN_8086&DEV_2A43
PCI\VEN_8086&DEV_2E03
PCI\VEN_8086&DEV_2E13
PCI\VEN_8086&DEV_2E23
PCI\VEN_8086&DEV_2E33
PCI\VEN_8086&DEV_2E43
PCI\VEN_8086&DEV_2E93
PCI\VEN_8086&DEV_A002
PCI\VEN_8086&DEV_A012
{473A6B1D-3407-400E-B91A-F991C5A39DC3}\CSRBTPORT
BLUETOOTH\0004&0004
BLUETOOTH\0004&0006
BLUETOOTH\TOSRFBD

ROOT\BLUETOOTH_COM
ROOT\BCMVWL
{F12D3CF8-B11D-457E-8641-BE2AF2D6D204}\BTAUDIOBUS
PCI\VEN_8086&DEV_2776
PCI\VEN_8086&DEV_27A6
PCI\VEN_8086&DEV_2973
PCI\VEN_8086&DEV_2983
PCI\VEN_8086&DEV_2993
PCI\VEN_8086&DEV_29A3
PCI\VEN_8086&DEV_29B3
PCI\VEN_8086&DEV_29C3
PCI\VEN_8086&DEV_29D3
PCI\VEN_8086&DEV_2A03
PCI\VEN_8086&DEV_2A13
PCI\VEN_8086&DEV_2A43
PCI\VEN_8086&DEV_2E03
PCI\VEN_8086&DEV_2E13
PCI\VEN_8086&DEV_2E23
PCI\VEN_8086&DEV_2E33
PCI\VEN_8086&DEV_2E43
PCI\VEN_8086&DEV_2E93
PCI\VEN_8086&DEV_A002
PCI\VEN_8086&DEV_A012
{473A6B1D-3407-400E-B91A-F991C5A39DC3}\CSRBTPORT
BLUETOOTH\0004&0004
BLUETOOTH\0004&0006
BLUETOOTH\TOSRFBD
ROOT\BLUETOOTH_COM
ROOT\BCMVWL
{F12D3CF8-B11D-457E-8641-BE2AF2D6D204}\BTAUDIOBUS
AVAST END USER LICENSE AGREEMENT
(FREE VERSION)
PLEASE READ THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT ("AGREEMENT") CAR
EFULLY BEFORE USING THE SOFTWARE (AS DEFINED BELOW). THIS IS A LEGALLY BINDING C
ONTRACT BETWEEN YOU AND AVAST SOFTWARE s.r.o., A COMPANY DULY ORGANIZED AND EXIS
TING UNDER THE LAWS OF THE CZECH REPUBLIC, REGISTERED IN THE COMMERCIAL REGISTER
MAINTAINED BY THE MUNICIPAL COURT IN PRAGUE IN SECTION C, INSERT NO. 216540, ID
ENTIFICATION NO.
021 764 75 ("AVAST"). BY ASSENTING ELECTRONICALLY, INSTALLING OR USING THIS SOFT
WARE YOU ACCEPT ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT. If you do not a
gree with the terms and conditions of this Agreement, do not continue the instal
lation process and delete or destroy all copies of the Software in your possessi
on.
This Agreement accompanies certain software (including any upgrades or updates t
hereto as provided by AVAST, the "Software") and related explanatory written mat
erials. In this Agreement, "Documentation" means on-line explanatory information
provided with the Software together with any information provided by AVAST that
lists the conditions subject to which you may use (or continue to use) the Soft
ware (the "Documentation")
1. License
AVAST grants to you a non-exclusive perpetual license to use the Software and th
e Documentation for so long as AVAST makes the Software available, provided that
you agree to the terms and conditions of this Agreement.

2. Permitted Use of the Software


You may install and use the Software on an unlimited number of computers. The So
ftware must be used exclusively 1) by you as an individual or members of your ho
usehold solely for private noncommercial purposes or 2) by you as an educational
establishment in the U.S.A. (public or non-profit educational institution/educa
tion organization - includes grades K-12 and higher, vocational/trade schools, h
ead start programs or other entities with educational purposes under 501(c) of t
he IRS Publication 557 - Organization Reference Chart section) solely for your i
nternal non-commercial purposes or 3) by you as a public library in the U.S.A. s
olely for your internal non-commercial purposes (whereas U.S.A. includes all 50
states, the District of Columbia, and the territories of American Samoa, Guam, M
arianas, Puerto Rico, and the U.S. Virgin Islands) or 4) for internal support to
you as a sole proprietorship or les tres petites entreprises (TPE) with registe
red office in France. You may also make appropriate number of the backup copies
of the Software but not more than ten.
ANY USE OF THE SOFTWARE OTHER THAN AS EXPRESSLY AUTHORIZED BY THIS SECTION OR AN
Y RESALE OR FURTHER DISTRIBUTION OF THE SOFTWARE CONSTITUTES A MATERIAL BREACH O
F THIS AGREEMENT AND MAY VIOLATE APPLICABLE COPYRIGHT LAWS.
3. Upgrades and Updates
Upgrades and updates of the Software shall be provided to you by AVAST as long a
s and to the extent in which AVAST in its exclusive discretion makes such upgrad
es and updates available to the users of the free version of the Software.
4. Ownership Rights
The Software and Documentation is the intellectual property of AVAST and is prot
ected by applicable copyright laws, international treaty provisions and other ap
plicable laws of the country in which the Software is being used. The structure,
organization and code of the Software are valuable trade secrets and confidenti
al information of AVAST. To the extent you provide any comments or suggestions a
bout the Software to AVAST, AVAST shall have the right to retain and use any suc
h comments or suggestions in our current or future products or services, without
further compensation to you and without your approval of such retention or use.
Except as stated in this Agreement, your possession, installation and use of the
Software does not grant you any rights or title to any intellectual property ri
ghts in the Software or Documentation. All rights to the Software and Documentat
ion, including all associated copyrights, patents, trade secret rights, trademar
ks and other intellectual property rights, are reserved by AVAST.
5. Restrictions
You may not copy or use the Software or the Documentation except as set forth in
Section 2 of this Agreement. You may not remove any proprietary notices or labe
ls on the Software; any copies that you are permitted to make pursuant to this A
greement must contain the same copyright and other proprietary notices that appe
ar on and in the Software. You agree not to modify, adapt, translate, reverse en
gineer, decompile or disassemble the Software or otherwise attempt to discover t
he source code of the Software or algorithms contained therein or create any der
ivative works from the Software. You are not permitted to use the Software in co
nnection with the provision of any commercial services which include processing
or transferring the data of or for other persons or entities ("Data"), including
cloud computing and "Software as a Service" solutions, providing storage capaci
ties for Data; transmitting, routing of or providing connection to Data, or prov
iding information search tool services. You may not permit third parties to bene
fit from the use or functionality of the Software via a timesharing, service bu

reau or other similar arrangement.


6. Transfer
You may not rent, lease, sub-license, or lend the Software or the Documentation
or any portions thereof. You may, however, transfer all your rights to use the S
oftware and the Documentation to another individual/entity mentioned in Section
2 hereof provided that (i) the transferee accepts the terms of this Agreement; (
ii) you transfer the Software, including all copies, updates and prior versions,
and all Documentation to such individual/entity; and (iii) you retain no copies
of the Software or of the Documentation, including but not limited to copies st
ored on your computer. Partial transfer of your rights under this Agreement is s
trictly prohibited.
7. Disclaimers and Exclusion of Liability
Be aware that the Software may make changes to your computer that may adversely
affect its functionality, such as deleting system or application files identifie
d (correctly or incorrectly) by the Software as infected. You acknowledge and ag
ree to such changes to your computer that may occur as a result of your use of t
he Software. The Software is not fault-tolerant and as such is not designed for
use in hazardous environments requiring fail-safe performance.
AVAST AND ITS DISTRIBUTORS DO NOT AND CANNOT WARRANT THE PERFORMANCE OR RESULTS
YOU MAY OBTAIN BY USING THE SOFTWARE OR DOCUMENTATION. THE REMEDY IN THIS SECTIO
N STATES THE SOLE AND EXCLUSIVE REMEDIES FOR AVAST S OR ITS DISTRIBUTORS OR AGE
NTS BREACH OF WARRANTY. THE SOFTWARE IS PROVIDED "AS IS" AND AVAST AND ITS DIST
RIBUTORS MAKE NO EXPRESS OR IMPLIED WARRANTIES OR CONDITIONS AND, TO THE MAXIMUM
EXTENT PERMITTED BY LAW, DISCLAIM ANY AND ALL CONDITIONS AND WARRANTIES IMPLIED
BY STATUTE, COMMON LAW OR JURISPRUDENCE, INCLUDING BUT NOT LIMITED TO IMPLIED W
ARRANTIES OF NONINFRINGEMENT OF THIRD PARTY RIGHTS, MERCHANTABILITY, SUITABLE QU
ALITY OR FITNESS FOR ANY PARTICULAR PURPOSE.
YOU AGREE AND ACCEPT THAT, TO THE FULL EXTENT PERMITTED BY LAW, IN NO EVENT WILL
AVAST OR ITS DISTRIBUTORS OR AGENTS BE LIABLE TO YOU FOR ANY DAMAGES, ESPECIALL
Y FOR CONSEQUENTIAL, INCIDENTAL OR SPECIAL DAMAGES, INCLUDING ANY LOST PROFITS,
LOST SAVINGS OR LOST DATA, EVEN IF AVAST OR ITS DISTRIBUTOR OR AGENT HAS BEEN AD
VISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY THIRD PARTY. T
O THE FULL EXTENT
PERMITTED BY LAW, YOU AGREE AND ACCEPT THAT IN NO CASE SHALL AVAST S OR
ITS DISTRIBUTORS OR AGENTS LIABILITY FOR ANY DAMAGE EXCEED THE LESSER
OF FIVE U.S. DOLLARS ($5.00) OR THE AMOUNT OF THE ONE YEAR LICENSE FEE FOR AVAST
S COMMERCIAL PRODUCT CLOSEST TO YOUR FREE VERSION OF THE SOFTWARE.
THE FOREGOING EXCLUSIONS AND LIMITATIONS OF LIABILITY OF AVAST AND ITS DISTRIBUT
ORS DO NOT LIMIT POTENTIAL LIABILITY FOR DEATH, PERSONAL INJURY OR FRAUD OVER TH
E EXTENT PERMITTED BY APPLICABLE LAWS.
8. Privacy; Processing of Personal Information
AVAST collects certain information regarding the users of the Software, includin
g certain personally identifiable information. This collection and use of this i
nformation is described in and governed by AVAST s privacy policy, available at
https://www.avast.com/privacy-policy. By accepting this Agreement, you consent t
o AVAST s collection and use of such information.
9. U.S. Government Restricted Rights
This Software and Documentation are deemed to be "commercial computer software"
and "commercial computer software documentation", respectively, and subject to c

ertain restricted rights as identified in FAR Section 52.227-19 "Commercial Comp


uter Software - Restricted Rights" and DFARS 227.7202, "Rights in Commercial Co
mputer Software or Commercial Computer Software Documentation", as applicable, o
r any successor U.S. regulations. Any use, modification, reproduction, release,
performance, display or disclosure of the Software by the U.S. Government shall
be done solely in accordance with this Agreement.
10. Export Regulations
You agree and accept that the Software and the Documentation may be subject to i
mport and export laws of any country, including those of the United States (spec
ifically the Export Administration Regulations (EAR)) and the European Union. If
you transfer or export the Software, which in all cases must be done in accorda
nce with this Agreement, you agree to and acknowledge that you are exclusively r
esponsible for complying with all applicable laws and regulations, including but
not limited to all United States and European Union trade sanctions and export
regulations (including any activities relating to nuclear, chemical or biologica
l materials or weapons, missiles or technology capable of mass destruction), reg
ardless of the country in which you reside in or of which you are a citizen.
11. Governing Law and Jurisdiction
The laws of the State of California, excluding its conflicts of law rules, gover
n this Agreement and your use of the Software and the Documentation. The applica
tion of the United Nations Convention on Contracts for the International Sale of
Goods is expressly excluded. The courts located within the county of Santa Clar
a, California shall be the exclusive jurisdiction and venue for any dispute or l
egal matter arising out of or in connection with this Agreement or your use of t
he Software and the Documentation. Notwithstanding this, you agree that AVAST sh
all still be allowed to apply for injunctive remedies (or an equivalent type of
urgent legal relief) in any jurisdiction.
12. General
This Agreement is the entire agreement between you and AVAST relating to the Sof
tware and Documentation. This Agreement supersedes all prior or contemporaneous
oral or written communications, proposals, and representations with respect to t
he Software or Documentation. Notwithstanding the foregoing, nothing in this Ag
reement will diminish any rights you may have under existing consumer protection
legislation or other applicable laws in your jurisdiction that may not be waive
d by contract.
This Agreement will immediately terminate upon your breach of any obligation con
tained herein (especially your obligations in Sections 2, 5, 10). AVAST reserves
the right to any other remedies available under law in the event your breach of
this Agreement adversely affects AVAST or its distributors or agents. The limit
ations of liability and disclaimers of warranty and damages contained herein sha
ll survive termination of this Agreement. This Agreement may be modified by the
Documentation. No provision hereof shall be deemed waived unless such waiver sh
all be in writing and signed by AVAST. If any provision of this Agreement is hel
d invalid, the remainder of this Agreement shall continue in full force and effe
ct.
If you have any questions regarding this Agreement or wish to request any inform
ation from AVAST, please write to AVAST Software s.r.o., Budejovicka 1518/13a, M
ichle, 140 00 Praha 4, Czech Republic, e-mail: support@avast.com, tel.: +420 274
005 777 or visit our support page at www.avast.com/support.
TEMA

about_Scripts
DESCRIPCIN BREVE
Describe como se escriben y ejecutan scripts en Windows PowerShell.
DESCRIPCIN DETALLADA
Un script es un archivo de texto sin formato que contiene uno o
varios comandos de Windows PowerShell. Los scripts de Windows
PowerShell tiene la extensin .ps1.
Al escribir un script, se guarda un comando para utilizarlo
posteriormente y se facilita su uso compartido con otros
usuarios. Y lo que es ms importante, un script permite ejecutar
los comandos escribiendo simplemente su ruta de acceso y nombre
de archivo. Los scripts pueden ser tan simples como un solo
comando en un archivo o tan extensos como un programa complejo.
Los scripts tienen caractersticas adicionales, como el
comentario especial #Requires, el uso de parmetros, la
compatibilidad con secciones de datos y firmas digitales por
motivos de seguridad. Asimismo, se pueden escribir temas de Ayuda
para los scripts y para cualquier funcin en los scripts.
CMO ESCRIBIR UN SCRIPT
Un script puede contener cualquier comando vlido de Windows
PowerShell, como un solo comando, comandos que usan la
canalizacin, funciones y estructuras de control, como
instrucciones If y bucles For.
Para escribir un script, inicie un editor de texto, como Bloc de
notas, o un editor de scripts, como Entorno de scripting
integrado (ISE) de Windows PowerShell. Escriba los comandos y
gurdelos en un archivo con un nombre de archivo vlido y la
extensin .ps1.
El ejemplo siguiente es un script simple que obtiene los
servicios que se estn ejecutando en el sistema actual y los
guarda en un archivo de registro. El nombre del archivo de
registro se crea a partir de la fecha actual.
$date = (get-date).dayofyear
get-service | out-file "$date.log"
Para crear este script, abra un editor de texto o un editor de
scripts, escriba estos comandos y, a continuacin, gurdelos en un archivo denom
inado
"registroDeServicios.ps1".
CMO EJECUTAR UN SCRIPT
Para poder ejecutar un script, deber cambiar la directiva de
ejecucin predeterminada de Windows PowerShell. La directiva de
ejecucin predeterminada, "Restricted", evita la ejecucin de
todos los scripts, incluidos los que se escriben en el equipo
local. Para obtener ms informacin, vea about_Execution_Policies.
Para ejecutar un script, escriba el nombre completo y la ruta de
acceso completa al archivo de script.

Por ejemplo, para ejecutar el script registroDeServicios en el


directorio C:\Scripts, escriba:
c:\scripts\registroDeServicios.ps1
Para ejecutar un script en el directorio actual, escriba la ruta
de acceso al directorio actual o use un punto para representar el
directorio actual, seguido de una barra diagonal inversa (.\).
Por ejemplo, para ejecutar el script registroDeServicios.ps1 en
el directorio local, escriba:
.\registroDeServicios.ps1
Por motivos de seguridad, Windows PowerShell no ejecuta scripts
cuando se hace doble clic el icono de un script en el Explorador
de Windows o se escribe el nombre del script sin ruta de acceso
completa, incluso si el script se encuentra en el directorio
actual. Para obtener ms informacin sobre la ejecucin de comandos
y scripts en Windows PowerShell, vea about_Command_Precedence.
EJECUTAR LOS SCRIPTS DE FORMA REMOTA
Para ejecutar un script en un equipo remoto, utilice el parmetro
FilePath del cmdlet Invoke-Command.
Escriba la ruta de acceso y el nombre de archivo del script como el valor
del parmetro FilePath. El script debe residir en el equipo local o en un
directorio al que pueda obtener acceso el equipo local.
El comando siguiente ejecuta el script registroDeServicios.ps1 en
el equipo remoto Servidor01.
invoke-command -computername Servidor01 -filepath C:\scripts\registroDeS
ervicios.ps1

PARMETROS EN LOS SCRIPTS


Para definir parmetros en un script, utilice una instruccin
Param. La instruccin Param debe ser la primera instruccin en un
script, salvo en el caso de los comentarios e instrucciones #requires.
Los parmetros de script funcionan de la misma manera que los
parmetros de funcin. Los valores de parmetro estn disponibles
para todos los comandos en el script. Todas las caractersticas
de los parmetros de funcin, incluidos el atributo Parameter y
sus argumentos con nombre, tambin son vlidas en los scripts.
Al ejecutar un script, se escriben los parmetros despus del
nombre del script.
En el ejemplo siguiente se muestra un script Prueba-Remota.ps1
que tiene un parmetro ComputerName. Ambas funciones del script
pueden obtener acceso al valor del parmetro ComputerName.
param ($ComputerName = $(throw "El parmetro ComputerName es obligatorio."

))
function CanPing {
$error.clear()
$tmp = test-connection $computername -erroraction SilentlyContinue
if (!$?)
{write-host "Error de ping: $ComputerName."; return $false}
else
{write-host "Ping correcto: $ComputerName"; return $true}
}
function CanRemote {
$s = new-pssession $computername -erroraction SilentlyContinue
if ($s -is [System.Management.Automation.Runspaces.PSSession])
{write-host "Prueba remota correcta: $ComputerName."}
else
{write-host "Error de prueba remota: $ComputerName."}
}
if (CanPing $computername) {CanRemote $computername}
Para ejecutar este script, escriba el nombre del parmetro
despus del nombre del script. Por ejemplo:
C:\PS> .\prueba-remota.ps1 -computername Servidor01
Ping correcto: Servidor01
Error de prueba remota: Servidor01
Para obtener ms informacin sobre la instruccin Param y los
parmetros de funcin, vea about_Functions y about_Functions_Advan
ced_Parameters.

AYUDA PARA LOS SCRIPTS


El cmdlet Get-Help obtiene ayuda para los scripts, as
los cmdlets, proveedores y funciones. Si desea obtener
un script, escriba Get-Help as como la ruta de acceso
nombre de archivo del script. Si la ruta de acceso del
est en la variable de entorno Path, podr omitirla.

como para
la Ayuda para
y el
script

Por ejemplo, si desea obtener la Ayuda para el script registroDeServi


cios.ps1, escriba:
get-help C:\admin\scripts\registroDeServicios.ps1
Puede escribir la Ayuda de un script mediante cualquiera de los
dos mtodos siguientes:
-- Ayuda basada en comentarios para los scripts
Se puede crear un tema de la Ayuda usando palabras clave
especiales en los comentarios. Para crear la Ayuda basada en
comentarios para un script, los comentarios deben colocarse

al principio o al final del archivo de script. Para obtener


ms informacin sobre la Ayuda basada en comentarios, vea
about_Comment_Based_Help.
-- Ayuda basada en XML para los scripts
Se puede crear un tema de ayuda basado en XML, del tipo de
los que suelen crearse para los cmdlets. La Ayuda basada en
XML es necesaria cuando se van a traducir los temas de la Ayuda
a varios idiomas.
Para asociar el script al tema de la Ayuda basado en XML, se
utiliza la palabra clave de comentario de la Ayuda .ExternalHelp.
Para obtener ms informacin sobre la palabra clave ExternalHelp,
vea about_Comment_Based_Help. Para obtener ms informacin sobre
la Ayuda basada en XML, vea el tema acerca de cmo se escribe
la Ayuda de los cmdlets en MSDN Library en
http://go.microsoft.com/fwlink/?LinkID=123415.

MBITO DE LOS SCRIPTS Y SCRIPTS PREFIJADOS POR PUNTOS


Cada script se ejecuta en su propio mbito. Los alias, funciones,
variables y unidades que se crean en el script existen nicamente
en el mbito del script y no se puede obtener acceso a estos
elementos ni a sus valores en el mbito en el que se ejecuta el script.
Para ejecutar un script en un mbito diferente, puede especificar
un mbito, como Global o Local, o usar un script prefijado por punto.
La caracterstica de script prefijado por punto permite ejecutar
un script en el mbito actual en lugar de ejecutarlo en el mbito
del script. Cuando se ejecuta un script prefijado por punto, los
comandos del script se ejecutan como si se hubieran escrito en el
smbolo del sistema. Los alias, funciones, variables y unidades
que el script crea se crean en el mbito en el que se est trabajando.
Despus de ejecutar el script, se pueden usar los elementos creados
y se puede obtener acceso a sus valores en la sesin.
Para usar un script prefijado por punto, escriba un punto (.) y
un espacio delante de la ruta de acceso al script.
Por ejemplo:
. C:\scripts\funcionesDeUtilidad.ps1
-o bien,
. .\funcionesDeUtilidad.ps1
Despus de ejecutarse el script funcionesDeUtilidad, las funciones y
variables creadas por el script se agregan al mbito actual.
Por ejemplo, el script funcionesDeUtilidad.ps1 crea la funcin
New-Profile y la variable $ProfileName.
#En funcionesDeUtilidad.ps1

function New-Profile
{
Write-Host "Se est ejecutando la funcin New-Profile"
$profileName = split-path $profile -leaf
if (test-path $profile)
{write-error "Ya hay un perfil $profileName en este equipo."}
else
{new-item -type file -path $profile -force }
}
Si se ejecuta el script funcionesDeUtilidad.ps1 en su propio
mbito, la funcin New-Profile y la variable $ProfileName solo
existen durante la ejecucin del script. Cuando se cierra el
script, se quitan la funcin y la variable, tal y como se muestra
en el ejemplo siguiente.
C:\PS> .\funcionesDeUtilidad.ps1
C:\PS> New-Profile
El trmino new-profile no se reconoce como cmdlet, funcin,
programa ejecutable ni archivo de script. Compruebe el
trmino e intntelo de nuevo.
En lnea:1 carcter:12
+ new-profile <<<<
+ CategoryInfo
: ObjectNotFound: (new-profile:String) [],
+ FullyQualifiedErrorId : CommandNotFoundException
C:\PS> $profileName
C:\PS>
Si usa y ejecuta el script prefijado por punto, el script crea la
funcin New-Profile y la variable $ProfileName en su sesin en su
mbito. Despus de ejecutar el script, puede usar la funcin New-Profile
en su sesin, tal y como se muestra en el ejemplo siguiente.
C:\PS> . .\funcionesDeUtilidad.ps1
C:\PS> New-Profile
Directory: C:\Users\juneb\Documents\WindowsPowerShell
Mode
----a---

LastWriteTime
Length Name
------------------ ---1/14/2009 3:08 p. m.
0 Microsoft.PowerShellISE_profile.p

s1
C:\PS> $profileName
Microsoft.PowerShellISE_profile.ps1
Para obtener ms informacin sobre los mbitos, vea about_Scopes.

SCRIPTS EN MDULOS
Un mdulo es un conjunto de recursos relacionados de Windows
PowerShell que se pueden distribuir como una unidad. Puede usar
mdulos para organizar los scripts, funciones y otros recursos.
Tambin puede utilizarlos para distribuir cdigo a otros usuarios
y obtener cdigo de orgenes de confianza.
Puede incluir scripts en los mdulos o crear un mdulo de script,
que es un mdulo que se compone completamente o principalmente de
un script y recursos auxiliares. Un mdulo de script es
simplemente un script con la extensin .psm1.
Para obtener ms informacin sobre los mdulos, vea about_Modules.

OTRAS CARACTERSTICAS DE LOS SCRIPTS


Windows PowerShell incluye numerosas caractersticas tiles que
se pueden usar en los scripts.
#Requires
Puede usar una instruccin #Requires para evitar que un
script se ejecute sin los mdulos o complementos
especificados y sin la versin especificada de Windows
PowerShell. Para obtener ms informacin, vea about_Requires.
$MyInvocation
La variable automtica $MyInvocation contiene informacin
sobre el comando actual, incluido el script actual. Puede
usar esta variable y sus propiedades para obtener informacin
sobre el script durante su ejecucin. Por ejemplo, la variable
$MyInvocation.MyCommand.Path contiene la ruta de acceso y el nombre
de archivo del script.
Secciones de datos
Puede usar la palabra clave Data para separar los datos de la
lgica en los scripts.
Las secciones de datos tambin pueden facilitar la
localizacin. Para obtener ms informacin, vea
about_Data_Sections y about_Script_Localization.
Firma de los scripts
Puede agregar una firma digital a un script. Segn la
directiva de ejecucin, puede usar firmas digitales para
restringir la ejecucin de los scripts que podran incluir
comandos inseguros. Para obtener ms informacin, vea
about_Execution_Policies y about_Signing.

VEA TAMBIN
about_Command_Precedence
about_Comment_Based_Help
about_Execution_Policies
about_Functions
about_Modules
about_Profiles
about_Requires

about_Scopes
about_Script_Blocks
about_Signing
Invoke-Command
TEMA
about_assignment_operators
DESCRIPCIN BREVE
Describe cmo utilizar operadores para asignar valores a las
variables.
DESCRIPCIN DETALLADA
Los operadores de asignacin asignan uno o ms valores a una variable.
Pueden realizar operaciones numricas con los valores antes de la
asignacin.
Windows PowerShell admite los siguientes operadores de asignacin.
Operador Descripcin
------- ----------=
Establece el valor de una variable en el valor especificado.
+=

Aumenta el valor de una variable en el valor


especificado o anexa el valor especificado al valor existente.

-=

Disminuye el valor de una variable en el valor especificado.

*=

Multiplica el valor de una variable por el valor


especificado o anexa el valor especificado al valor existente.

/=

Divide el valor de una variable por el valor especificado.

%=

Divide el valor de una variable por el valor


especificado y, a continuacin, asigna el resto (mdulo) a la
variable.

++

Aumenta en 1 el valor de una variable, una propiedad


asignable o un elemento de matriz.

--

Disminuye en 1 el valor de una variable, una propiedad


asignable o un elemento de matriz.

SINTAXIS
Esta es la sintaxis de los operadores de asignacin:
<expresin-asignable> <operador-de-asignacin> <valor>
Las expresiones asignables incluyen variables y propiedades. El
valor puede ser un valor nico, una matriz de valores, un comando, una
expresin o una instruccin.
Los operadores de decremento e incremento son operadores unarios.

Cada uno de ellos presenta versiones de prefijo y postfijo.


<expresin-asignable><operador>
<operador><expresin-asignable>
La expresin asignable debe un nmero o debe ser convertible a un
nmero.
ASIGNAR VALORES
Las variables son espacios de memoria con nombre que almacenan
valores. Los valores se almacenan en variables mediante el operador de
asignacin (=). Se puede hacer que el nuevo valor sustituya al valor
existente de la variable o bien anexar un valor nuevo al existente.
El operador de asignacin bsico es el signo igual (=) (ASCII 61). Por
ejemplo, la instruccin siguiente asigna el valor Windows PowerShell a la
variable $MyShell:
$MyShell = "Windows PowerShell"
Al asignar un valor a una variable en Windows PowerShell, se crea la
variable si todava no existe. Por ejemplo, la primera de las dos
instrucciones de asignacin siguientes crea la variable $a y le
asigna el valor 6. La segunda instruccin de asignacin asigna el
valor 12 a $a. La primera instruccin crea una nueva variable.
La segunda instruccin solamente cambia su valor:
$a = 6
$a = 12
En Windows PowerShell, las variables no tienen un tipo de datos
especfico a no ser que se conviertan. Cuando una variable
contiene un solo objeto, toma el tipo de datos de ese objeto. Cuando
contiene una coleccin de objetos, la variable tiene el tipo de datos
System.Object. Por consiguiente, se puede asignar cualquier tipo de
objeto a la coleccin. En el ejemplo siguiente se muestra que es
posible agregar objetos de proceso, objetos de servicio, cadenas y
enteros a una variable sin generar un error:
$a
$a
$a
$a

= get-process
+= get-service
+= "cadena"
+= 12

Dado que el operador de asignacin (=) tiene una precedencia


menor que el operador de canalizacin (|), no es necesario usar
parntesis para asignar el resultado de una canalizacin de
comandos a una variable. Por ejemplo, el comando siguiente ordena los
servicios en el equipo y, a continuacin, asigna los servicios
ordenados la variable $a:

$a = get-service | sort name


Tambin se puede asignar a una variable el valor creado por una
instruccin, como en el ejemplo siguiente:
$a = if ($b -lt 0) { 0 } else { $b }
En este ejemplo se asigna 0 a la variable $a si el valor de $b es
menor que 0. Se asigna a $a el valor de $b si el valor de $b no
es menor que cero.

OPERADOR DE ASIGNACIN (=)


El operador de asignacin (=) asigna valores a las variables. Si
la variable ya tiene un valor, el operador de asignacin (=)
reemplaza el valor sin generar ninguna advertencia.
La instruccin siguiente asigna el valor entero 6 a la variable $a:
$a = 6
Para asignar un valor de cadena a una variable, el valor debe
escribirse entre comillas dobles, como se muestra a continuacin:
$a = "ftbol"
Para asignar una matriz (varios valores) a una variable, se
separan los valores con comas, como sigue:
$a = "manzana", "naranja", "limn", "uva"
Para asignar una tabla hash a una variable, se utiliza la
notacin de tabla hash estndar en Windows PowerShell. Se escribe
un smbolo de arroba (@) seguido por pares de clave/valor
separados por signos de punto y coma (;), todos ellos entre
llaves ({}). Por ejemplo, para asignar una tabla hash a la
variable $a, escriba:
$a = @{uno=1; dos=2; tres=3}
Para asignar
precedido de
(0x10) en un
variable $a.
$a, escriba:

valores hexadecimales a una variable, el valor debe ir


"0x". Windows PowerShell convierte el valor hexadecimal
valor decimal (en este caso, 16) y asigna ese valor a la
Por ejemplo, para asignar el valor 0x10 a la variable

$a = 0x10
Para asignar un valor exponencial a una variable, se escribe el
nmero raz, luego la letra "e" y, a continuacin, un nmero que
representa un mltiplo de 10. Por ejemplo, para asignar a la
variable $a el valor 3,1415 elevado a una potencia de 1.000, escriba:
$a = 3.1415e3
Windows PowerShell tambin puede convertir kilobytes (KB),
megabytes (MB) y gigabytes (GB) en bytes. Por ejemplo, para
asignar el valor 10 kilobytes a la variable $a, escriba:
$a = 10kb
ASIGNACIN MEDIANTE EL OPERADOR DE ADICIN (+=)
La asignacin mediante el operador de adicin (+=) incrementa el
valor de una variable o bien anexa el valor especificado al valor
existente. La accin depende de si el tipo de la variable es
numrico o de cadena, y de si la variable contiene un solo valor
(un escalar) o varios (una coleccin).
El operador += combina dos operaciones. En primer lugar, suma y, a
continuacin, asigna. Por consiguiente, las instrucciones siguientes son
equivalentes:
$a += 2
$a = ($a + 2)
Cuando la variable contiene un solo valor numrico, el operador +=
incrementa el valor existente en la cantidad especificada en el lado
derecho del operador. A continuacin, el operador asigna el valor
resultante a la variable.
En el ejemplo siguiente se muestra cmo utilizar el operador += para
aumentar el valor de una variable:
C:\PS> $a = 4
C:\PS> $a += 2
C:\PS> $a
6
Cuando el valor de la variable es de cadena, se anexa a la cadena
el valor que figura a la derecha del operador, como sigue:
C:\PS> $a = "Windows"
C:\PS> $a +- " PowerShell"
C:\PS> $a
Windows PowerShell

Cuando el valor de la variable es una matriz, el operador +=


anexa a la matriz los valores que figuran en el lado derecho del
operador. A menos que se establezca explcitamente el tipo de la
matriz mediante una conversin, se puede anexar cualquier tipo de
valor a la matriz, como sigue:
C:\PS>
C:\PS>
C:\PS>
1
2
3
2
C:\PS>
C:\PS>
1
2
3
2
Cadena

$a = 1,2,3
$a += 2
$a

$a += "Cadena"
$a

Cuando el valor de una variable es una tabla hash, el operador +=


anexa a la tabla hash el valor que figura en el lado derecho del
operador. Sin embargo, dado que el nico tipo que se puede
agregar a una tabla hash es otra tabla hash, todas las dems
asignaciones producen un error.
Por ejemplo, el
A continuacin,
hash a la tabla
agrega un nuevo
Este comando se

comando siguiente asigna una tabla hash la variable $a.


se utiliza el operador += para anexar otra tabla
hash existente, de tal forma que, en realidad, se
par de clave/valor a la tabla hash existente.
ejecuta correctamente, como se muestra en el resultado:

C:\PS> $a = @{a = 1; b = 2; c = 3}
C:\PS> $a += @{mode = "write"}
C:\PS> $a
Nombre
Valor
-------a
1
b
2
mode
write
c
3
El comando siguiente intenta anexar un entero (1) a la tabla hash
en la variable $a. Se produce un error en este comando:
C:\PS> $a = @{a = 1; b = 2; c = 3}
C:\PS> $a += 1
Solo se puede agregar una tabla de hash a otra tabla de hash.
En lnea:1 carcter:6
+ $a += <<<< 1

ASIGNACIN MEDIANTE EL OPERADOR DE SUSTRACCIN (-=)


El operador de asignacin por sustraccin (-=) disminuye el valor
de una variable en el valor especificado en el lado derecho del
operador.
Este operador no se puede utilizar con variables de cadena ni
para quitar un elemento de una coleccin.
El operador -= combina dos operaciones. En primer lugar, resta y, a
continuacin, asigna. Por consiguiente, las instrucciones siguientes son
equivalentes:
$a -= 2
$a = ($a - 2)
En el ejemplo siguiente se muestra cmo utilizar el operador -= para
disminuir el valor de una variable:
C:\PS> $a = 8
C:\PS> $a -= 2
C:\PS> $a
6
Tambin se puede utilizar el operador -= de asignacin para
disminuir el valor de un miembro de una matriz numrica. Para
ello, se debe especificar el ndice del elemento de matriz que se
desea modificar. En el ejemplo siguiente, se reduce en 1 el valor
del tercer elemento de una matriz (elemento 2):
C:\PS> $a = 1,2,3
C:\PS> $a[2] -= 1.
C:\PS> $a
1
2
2
No se puede utilizar el operador -= para eliminar valores de una
variable. Para eliminar todos los valores que estn asignados a
una variable, se utilizan los cmdlets Clear-Item o Clear-Variable para
asignar el valor $null o "" a la variable.
$a = $null
Para eliminar un valor determinado de una matriz, se utiliza la
notacin de matriz para asignar el valor $null al elemento de que
se trate. Por ejemplo, la instruccin siguiente elimina el
segundo valor (posicin de ndice 1) de una matriz:

C:\PS> $a = 1,2,3
C:\PS> $a

1
2
3
C:\PS> $a[1] = $null
C:\PS> $a
1
3
Para eliminar una variable se utiliza el cmdlet Remove-Variable.
Este mtodo resulta til cuando la variable se ha convertido
explcitamente a un tipo de datos determinado y desea una
variable sin tipo. El comando siguiente elimina la variable $a:
remove-variable a
ASIGNACIN MEDIANTE EL OPERADOR DE MULTIPLICACIN (*=) La
asignacin mediante el operador de multiplicacin (*=) multiplica
un valor numrico o anexa a una variable el nmero especificado de
copias del valor de cadena.
Cuando una variable contiene un solo valor numrico, ese valor se
multiplica por el valor que figura en el lado derecho del
operador. Por ejemplo, en el ejemplo siguiente se muestra cmo
utilizar el operador *= para multiplicar el valor de una variable:
C:\PS> $a = 3
C:\PS> $a *= 4
C:\PS> $a
12
En este caso, el operador *= combina dos operaciones. En primer lugar,
multiplica y, a continuacin, asigna. Por consiguiente, las instrucciones
siguientes son equivalentes:
$a *= 2
$a = ($a * 2)
Cuando una variable contiene un valor de cadena, Windows PowerShell anexa
al valor el nmero especificado de cadenas, como sigue:
C:\PS> $a = "archivo"
C:\PS> $a *= 4
C:\PS> $a
archivoarchivoarchivoarchivo
Para multiplicar un elemento de una matriz, se utiliza un ndice para
identificar el elemento que desea multiplicar. Por ejemplo, el
comando siguiente multiplica el primer elemento de la matriz
(posicin de ndice 0) por 2:

$a[0] *= 2
ASIGNACIN MEDIANTE EL OPERADOR DE DIVISIN (/=)
La asignacin mediante el operador de divisin (/=) divide un
valor numrico por el valor que se especifica en el lado derecho del
operador. Este operador no se puede usar con variables de cadena.
El operador /= combina dos operaciones. Primero, divide y, a
continuacin, asigna. Por consiguiente, las dos instrucciones
siguientes son equivalentes:
$a /= 2
$a = ($a / 2)
Por ejemplo, el comando siguiente utiliza el operador /= para
dividir el valor de una variable:
C:\PS> $a = 8
C:\PS> $a /=2
C:\PS> $a
4
Para dividir un elemento de una matriz, se debe utilizar un
ndice para identificar el elemento que se desea modificar. Por
ejemplo, el comando siguiente divide el segundo elemento de la matriz
(posicin de ndice 1) por 2:
$a[1] /= 2
ASIGNACIN MEDIANTE EL OPERADOR DE MDULO (%=)
El operador de asignacin por mdulo (%=) divide el valor de una
variable por el valor especificado en el lado derecho del operador.
A continuacin, el operador %= asigna a la variable el resto
(denominado mdulo). Este operador nicamente se puede utilizar cuando
la variable contiene un solo valor numrico. No se puede utilizar si la
variable contiene una variable de cadena o una matriz.
El operador %= combina dos operaciones. En primer lugar, divide y
determina el resto y, a continuacin, asigna el resto a la
variable. Por consiguiente, las instrucciones siguientes son
equivalentes:
$a %= 2
$a = ($a % 2)
En el ejemplo siguiente se muestra cmo utilizar el operador %=
para guardar el mdulo de un cociente:

C:\PS> $a = 7
C:\PS> $a %= 4
C:\PS> $a
3
OPERADORES DE DECREMENTO E INCREMENTO
El operador de incremento (++) aumenta el valor de una variable
en 1. Cuando se utiliza al operador de incremento en una
instruccin simple, no se devuelve ningn valor.
Para ver el resultado, debe mostrarse el valor de la variable,
como sigue:
C:\PS> $a = 7
C:\PS> ++$a
C:\PS> $a
8
Para forzar la devolucin de un valor, debe incluirse la variable y el
operador entre parntesis, como sigue:
C:\PS> $a = 7
C:\PS> (++$a)
8
El operador de incremento se puede colocar antes (prefijo) o despus
(postfijo) de una variable. La versin de prefijo del operador
incrementa la variable antes de que su valor se utilice en la
instruccin, como sigue:
C:\PS>
C:\PS>
C:\PS>
8
C:\PS>
8

$a = 7
$c = ++$a
$a
$c

La versin de postfijo del operador incrementa la variable


despus de haber utilizado su valor en la instruccin. En el ejemplo
siguiente, las variables $c y $a tienen valores diferentes porque el
valor se asigna a $c antes de que cambie $a:
C:\PS>
C:\PS>
C:\PS>
8
C:\PS>
7

$a = 7
$c = $a++
$a
$c

El operador de decremento (--) disminuye el valor de una variable


en 1. Al igual que sucede con el operador de incremento, no se
devuelve ningn valor cuando se utiliza el operador en una instruccin
simple. Para devolver un valor, se utilizan parntesis, como sigue:
C:\PS>
C:\PS>
C:\PS>
6
C:\PS>
5

$a = 7
--$a
$a
(--$a)

La versin de prefijo del operador disminuye la variable antes de


que su valor se utilice en la instruccin, como sigue:
C:\PS>
C:\PS>
C:\PS>
6
C:\PS>
6

$a = 7
$c = --$a
$a
$c

La versin de postfijo del operador disminuye la variable despus


de haber utilizado su valor en la instruccin. En el ejemplo
siguiente, las variables $d y $a tienen valores diferentes porque
el valor se asigna a $d antes de que cambie $a:
C:\PS>
C:\PS>
C:\PS>
6
C:\PS>
7

$a = 7
$d = $a-$a
$d

TIPOS DE MICROSOFT .NET FRAMEWORK


De forma predeterminada, cuando una variable tiene un solo valor,
el valor que se le asigna determina el tipo de datos de la
variable. Por ejemplo, el comando siguiente crea una variable
cuyo tipo es Integer (System.Int32):
$a = 6
Para buscar el tipo de .NET Framework de una variable, se utiliza
el mtodo GetType y su propiedad FullName, como sigue. Es importante
asegurarse de incluir los parntesis despus del nombre del mtodo
GetType, aunque la llamada al mtodo no tenga ningn argumento:
C:\PS> $a = 6
C:\PS> $a.gettype().fullname
System.Int32

Para crear una variable que contiene una cadena, se asigna un valor de
cadena a la variable. Para indicar que el valor es una cadena, se
pone entre comillas, como sigue:
C:\PS> $a = "6"
C:\PS> $a.gettype().fullname
System.String
Si el primer valor asignado a la variable es una cadena, Windows
PowerShell tratar todas las operaciones como operaciones de cadena y
convertir los nuevos valores en cadenas. Esto sucede en el ejemplo
siguiente:
C:\PS> $a = "archivo"
C:\PS> $a += 3
C:\PS> $a
archivo3
Si el primer valor asignado es un entero, Windows PowerShell
tratar todas las operaciones como operaciones de enteros y
convertir los nuevos valores en enteros. Esto sucede en el ejemplo
siguiente:
C:\PS> $a = 6
C:\PS> $a += "3"
C:\PS> $a
9
El tipo de una variable escalar nueva se puede convertir en
cualquier tipo de datos de .NET Framework. Para ello, debe
escribirse el nombre del tipo de datos entre corchetes como
prefijo del nombre de la variable o del primer valor de asignacin.
Al convertir una variable, es posible determinar los tipos de datos que
se pueden almacenar en ella. Adems, se puede determinar cmo se
comportar la variable al manipularla.
Por ejemplo, el comando siguiente convierte la variable a un tipo
string:
C:\PS> [string]$a = 27
C:\PS> $a += 3
C:\PS> $a
273
En el ejemplo siguiente se convierte el primer valor, en lugar de la
variable:
$a = [string]27

Al convertir una variable a un tipo especfico, la convencin comn es


convertir la variable propiamente dicha, y no su valor. Sin embargo,
no puede se puede volver a convertir el tipo de datos de una variable
existente si su valor no se puede convertir al nuevo tipo de datos.
Para cambiar el tipo de datos, es preciso reemplazar su valor, como sigue:
C:\PS> $a = "cadena"
C:\PS> [int]$a
No se puede convertir el valor "cadena" al tipo "System.Int32".
Error: "La cadena de entrada no tiene el formato correcto."
En lnea:1 carcter:8
+ [int]$a <<<<
C:\PS> [int]$a =3
Adems, si se usa un tipo de datos como prefijo de un nombre de
variable, el tipo de esa variable se bloquea, a menos que lo invalide
explcitamente especificando otro tipo de datos. Si se intenta
asignar un valor que no es compatible con el tipo existente y no invalida
explcitamente el tipo, Windows PowerShell muestra un error, como se
muestra en el ejemplo siguiente:
C:\PS> $a = 3
C:\PS> $a = "cadena"
C:\PS> [int]$a = 3
C:\PS> $a = "cadena"
No se puede convertir el valor "cadena" al tipo
"System.Int32". Error: "La cadena de entrada no tiene el formato
correcto."
En lnea:1 carcter:3
+ $a <<<< = "cadena"
C:\PS> [string]$a = "cadena"
En Windows PowerShell, los tipos de datos de las variables que
contienen varios elementos en una matriz se administran de manera
diferente que los tipos de datos de las variables que contienen
un nico elemento. A menos que se asigne un tipo de datos
especficamente a una variable de matriz, el tipo de datos es siempre
System.Object []. Este tipo de datos es especfico de las matrices.
En ocasiones, se puede invalidar el tipo predeterminado
especificando otro. Por ejemplo, el comando siguiente convierte
la variable a un tipo de matriz string []:

[string []] $a = "uno", "dos", "tres"


Las variables de Windows PowerShell pueden tener cualquier tipo
de datos de .NET Framework. Adems, se puede asignar el nombre
completo de cualquier tipo de datos de .NET Framework que est

disponible en el proceso actual. Por ejemplo, el comando siguiente


especifica un tipo de datos System.DateTime:
[system.datetime]$a = "31/5/2005"
Se asignar a la variable un valor que se ajuste al tipo
System.DateTime. El valor de la variable $a sera el siguiente:
Martes, 31 de marzo de 2005 12:00:00 a.m.
ASIGNAR MLTIPLES VARIABLES
En Windows PowerShell se pueden asignar valores a mltiples
variables con un solo comando. El primer elemento del valor de
asignacin se asigna a la primera variable, el segundo elemento
se asigna a la segunda variable, el tercer elemento a la tercera
variable, etc. Por ejemplo, el comando siguiente asigna el valor
1 a la variable $a, el segundo, el valor 2 a la variable $b y, el
tercero, el valor 3 a la variable $c:
C:\PS> $a, $b, $c = 1, 2, 3
Si el valor de asignacin contiene ms elementos que variables,
todos los valores que sobren se asignarn a la ltima variable.
Por ejemplo, el siguiente comando contiene tres variables y cinco
valores:
$a, $b, $c = 1, 2, 3, 4, 5
Por consiguiente, Windows PowerShell asignar el valor 1 a la
variable $a y el valor 2 a la variable $b. Adems, asignar los
valores 3, 4 y 5 a la variable $c. Para asignar los valores de la
variable $c a otras tres variables, se utiliza el formato siguiente:
$d, $e, $f = $c
Este comando asigna el valor 3 a la variable $d, el valor 4, a la
variable $e y el valor 5, a la variable $f.
Tambin puede asignar un valor individual a mltiples variables
encadenndolas. Por ejemplo, el siguiente comando asigna el valor "tres" a
cuatro variables:
$a = $b = $c = $d = "tres"
CMDLETS RELACIONADOS CON VARIABLES
Adems de usar una operacin de asignacin para establecer el
valor de una variable, tambin se puede usar el cmdlet Set-Variable.

Por ejemplo, el comando siguiente usa Set-Variable para


asignar la matriz 1, 2, 3 a la variable $a.
Set-Variable -name a -value 1, 2, 3
VEA TAMBIN
about_Arrays
about_Hash_Tables
about_Variables
Clear-Variable
Remove-Variable
Set-Variable

Potrebbero piacerti anche