en-US/Carbon.psm1-Help.xml
<?xml version="1.0" encoding="utf-8" ?>
<!-- Generated by: SAPIEN PowerShell Help Writer 2015 v1.0.9--> <helpItems xmlns="http://msh" schema="maml"> <!-- All Commands--> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Add-GroupMember</command:name> <maml:description> <maml:para>Adds a users or groups to a *local* group.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Add</command:verb> <command:noun>GroupMember</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>You would think it's pretty easy and straight-forward to add users/groups to a local group, but you would be wrong. The quick solution is to use `net localgroup`, but that won't accept user/group names longer than 24 characters. This means you have to use the .NET Directory Services APIs. How do you reliably add both users *and* groups? What if those users are in a domain? What if they're in another domain? What about built-in users? Fortunately, you're brain hasn't exploded. So, this function adds users and groups to a *local* group. If the members are already part of the group, nothing happens.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Add-GroupMember</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The group name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Member</maml:name> <maml:description> <maml:para>The users/groups to add to a group.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The group name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Member</maml:name> <maml:description> <maml:para>The users/groups to add to a group.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Add-GroupMember -Name Administrators -Member EMPIRE\DarthVader,EMPIRE\EmperorPalpatine,REBELS\LSkywalker</dev:code> <dev:remarks> <maml:para>Adds Darth Vader, Emperor Palpatine and Luke Skywalker to the local administrators group.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Add-GroupMember -Name TieFighters -Member NetworkService</dev:code> <dev:remarks> <maml:para>Adds the local NetworkService account to the local TieFighters group.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Add-IisDefaultDocument</command:name> <maml:description> <maml:para>Adds a default document name to a website.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Add</command:verb> <command:noun>IisDefaultDocument</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>If you need a custom default document for your website, this function will add it. The `FileName` argument should be a filename IIS should use for a default document, e.g. home.html. If the website already has `FileName` in its list of default documents, this function silently returns.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Add-IisDefaultDocument</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the site where the default document should be added.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>FileName</maml:name> <maml:description> <maml:para>The default document to add.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the site where the default document should be added.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>FileName</maml:name> <maml:description> <maml:para>The default document to add.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Add-IisDefaultDocument -SiteName MySite -FileName home.html</dev:code> <dev:remarks> <maml:para>Adds `home.html` to the list of default documents for the MySite website.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Add-TrustedHost</command:name> <maml:description> <maml:para>Adds an item to the computer's list of trusted hosts.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Add</command:verb> <command:noun>TrustedHost</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Adds an entry to this computer's list of trusted hosts. If the item already exists, nothing happens. PowerShell Remoting needs to be turned on for this function to work.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Add-TrustedHost</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Entry</maml:name> <maml:description> <maml:para>The computer name(s) to add to the trusted hosts</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Entry</maml:name> <maml:description> <maml:para>The computer name(s) to add to the trusted hosts</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Add-TrustedHost -Entry example.com</dev:code> <dev:remarks> <maml:para>Adds `example.com` to the list of this computer's trusted hosts. If `example.com` is already on the list of trusted hosts, nothing happens.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Enable-PSRemoting</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Assert-AdminPrivilege</command:name> <maml:description> <maml:para>Writes an error and returns false if the user doesn't have administrator privileges.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Assert</command:verb> <command:noun>AdminPrivilege</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Many scripts and functions require the user to be running as an administrator. This function checks if the user is running as an administrator or with administrator privileges and writes an error if the user doesn't.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Assert-AdminPrivilege</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Assert-AdminPrivilege</dev:code> <dev:remarks> <maml:para>Writes an error that the user doesn't have administrator privileges.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Test-AdminPrivilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Assert-FirewallConfigurable</command:name> <maml:description> <maml:para>Asserts that the Windows firewall is configurable and writes an error if it isn't.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Assert</command:verb> <command:noun>FirewallConfigurable</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The Windows firewall can only be configured if it is running. This function checks test if it is running. If it isn't, it writes out an error and returns `False`. If it is running, it returns `True`.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Assert-FirewallConfigurable</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Assert-FirewallConfigurable</dev:code> <dev:remarks> <maml:para>Returns `True` if the Windows firewall can be configured, `False` if it can't.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Assert-Service</command:name> <maml:description> <maml:para>Checks if a service exists, and writes an error if it doesn't.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Assert</command:verb> <command:noun>Service</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Also returns `True` if the service exists, `False` if it doesn't.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Assert-Service</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Assert-Service -Name 'Drivetrain'</dev:code> <dev:remarks> <maml:para>Writes an error if the `Drivetrain` service doesn't exist.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Test-Service</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Clear-DscLocalResourceCache</command:name> <maml:description> <maml:para>Clears the local DSC resource cache.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Clear</command:verb> <command:noun>DscLocalResourceCache</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>DSC caches resources. This is painful when developing, since you're constantly updating your resources. This function allows you to clear the DSC resource cache on the local computer. What this function really does, is kill the DSC host process running DSC.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Clear-DscLocalResourceCache</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Clear-DscLocalResourceCache</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Clear-MofAuthoringMetadata</command:name> <maml:description> <maml:para>Removes authoring metadata from .mof files.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Clear</command:verb> <command:noun>MofAuthoringMetadata</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Everytime PowerShell generates a .mof file, it includes authoring metadata: who created the file, on what computer, and at what date/time. This means a .mof file's checksum will change everytime a new one is generated, even if the configuration in that file didn't change. This makes it hard to know when a configuration in a .mof file has truly changed, and makes its change history noisy. This function strips/removes all authoring metadata from a .mof file. When given a path to a file, all authoring metadata is removed from that file. When given the path to a directory, removes authoring metadata from all `*.mof` files in that directory. Essentially, these blocks from each .mof file: /* @TargetNode='********' @GeneratedBy=******** @GenerationDate=08/19/2014 13:29:15 @GenerationHost=******** */ /* ...snip... */</maml:para> <maml:para> instance of OMI_ConfigurationDocument { Version="1.0.0"; Author="********; GenerationDate="08/19/2014 13:29:15"; GenerationHost="********"; }; Would be changed to: /* @TargetNode='JSWEB01L-WHS-08' */ /* ...snip... */ instance of OMI_ConfigurationDocument { Version="1.0.0"; };</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Clear-MofAuthoringMetadata</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the file/directory whose .mof files should be operated on.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the file/directory whose .mof files should be operated on.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Clear-MofAuthoringMetadata -Path 'C:\Projects\DSC\localhost.mof'</dev:code> <dev:remarks> <maml:para>Demonstrates how to clear the authoring data from a specific file.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Clear-MofAuthoringMetadata -Path 'C:\Projects\DSC'</dev:code> <dev:remarks> <maml:para>Demonstrates how to clear the authoring data from all .mof files in a specific directory.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Clear-TrustedHost</command:name> <maml:description> <maml:para>Removes all entries from PowerShell trusted hosts list.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Clear</command:verb> <command:noun>TrustedHost</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The `Add-TrustedHost` function adds new entries to the trusted hosts list. `Set-TrustedHost` sets it to a new list. This function clears out the trusted hosts list completely. After you run it, you won't be able to connect to any computers until you add them to the trusted hosts list.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Clear-TrustedHost</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Clear-TrustedHost</dev:code> <dev:remarks> <maml:para>Clears everything from the trusted hosts list.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Add-TrustedHost</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Set-TrustedHost</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Compress-Item</command:name> <maml:description> <maml:para>Compresses a file/directory using the `DotNetZip` library.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Compress</command:verb> <command:noun>Item</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>You can supply a destination file path, via the `OutFile` parameter. If the file doesn't exist, it is created. If it exists, use the `-Force` parameter to overwrite it. Each item added to the ZIP file will be added to the root of the file, with a name matching the original file's/directory's name. For example, if adding the file `C:\Projects\Carbon\RELEASE NOTE.txt`, it would get added to the ZIP file as `RELEASE NOTES.txt`. If you don't supply an output file path, one will be created in the current user's TEMP directory. A `System.IO.FileInfo` object is returned representing the ZIP file. Microsoft's DSC Local Configuration Manager is unable to unzip files compressed with the `DotNetZip` library (or the `ZipFile` class in .NET 4.5), so as an alternative, if you specify the `UseShell` switch, the file will be compressed with the Windows COM shell API.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Compress-Item</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName)" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the files/directories to compress.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>OutFile</maml:name> <maml:description> <maml:para>Path to destination ZIP file. If not provided, a ZIP file will be created in the current user's TEMP directory.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UseShell</maml:name> <maml:description> <maml:para>Uses the Windows COM shell API to create the zip file instead of the `DotNetZip` library. Microsoft's DSC Local Configuration Manager can't unzip files zipped with `DotNetZip` (or even the .NET 4.5 `ZipFile` class).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Overwrites an existing ZIP file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName)" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the files/directories to compress.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>OutFile</maml:name> <maml:description> <maml:para>Path to destination ZIP file. If not provided, a ZIP file will be created in the current user's TEMP directory.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UseShell</maml:name> <maml:description> <maml:para>Uses the Windows COM shell API to create the zip file instead of the `DotNetZip` library. Microsoft's DSC Local Configuration Manager can't unzip files zipped with `DotNetZip` (or even the .NET 4.5 `ZipFile` class).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Overwrites an existing ZIP file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <!-- Inputs--> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.IO.FileInfo</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Compress-Item -Path 'C:\Projects\Carbon' -OutFile 'C:\Carbon.zip'</dev:code> <dev:remarks> <maml:para>Demonstrates how to create a ZIP file of the `C:\Projects\Carbon` directory.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ChildItem -Path 'C:\Projects\Carbon' | Where-Object { $_.PsIsContainer} | Compress-Item -OutFile 'C:\Projects\Carbon.zip'</dev:code> <dev:remarks> <maml:para>Demonstrates how you can pipe items to `Compress-Item` for compressing.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Compress-Item -Path 'C:\Projects\Carbon' -OutFile 'C:\Carbon.zip' -UseShell</dev:code> <dev:remarks> <maml:para>Demonstrates how to create a ZIP file with the Windows shell COM APIs instead of the `DotNetZip` library.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>https://www.nuget.org/packages/DotNetZip</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Expand-Item</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-ZipFile</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Convert-SecureStringToString</command:name> <maml:description> <maml:para>Converts a secure string into a plain text string.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Convert</command:verb> <command:noun>SecureStringToString</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Sometimes you just need to convert a secure string into a plain text string. This function does it for you. Yay! Once you do, however, the cat is out of the bag and your password will be *all over memory* and, perhaps, the file system.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Convert-SecureStringToString</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SecureString</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SecureString</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue> <dev:type> <maml:name>SecureString</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Convert-SecureStringToString -SecureString $mySuperSecretPasswordIAmAboutToExposeToEveryone</dev:code> <dev:remarks> <maml:para>Returns the plain text/decrypted value of the secure string.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Convert-XmlFile</command:name> <maml:description> <maml:para>Transforms an XML document using XDT (XML Document Transformation).</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Convert</command:verb> <command:noun>XmlFile</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>An XDT file specifies how to change an XML file from a *known* beginning state into a new state. This is usually helpful when deploying IIS websites. Usually, the website's default web.config file won't work in different environments, and needs to be changed during deployment to reflect settings needed for the target environment. XDT was designed to apply a tranformation against an XML file in a *known* state. **Do not use this method to transform an XML file in-place.** There lies madness, and you will never get that square peg into XDT's round hole. If you *really* want to transform in-place, you're responsible for checking if the source/destination file has already been transformed, and if it hasn't, calling `Convert-XmlFile` to transform to a temporary file, then copying the temporary file onto the source/destination file. You can load custom transformations. In your XDT XML, use the `xdt:Import` element to import your transformations. In your XDT file: <?xml version="1.0"?> <root xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> <!-- You can also use the "assembly" attribute (PowerShell v3 *only*). In PowerShell v2, you can only use the `path` attribute. All classes in `namespace` that inherit from the XDT `Transform` class are loaded. --> <xdt:Import path="C:\Projects\Carbon\Lib\ExtraTransforms.dll" namespace="ExtraTransforms" /> <!-- ...snip... --> </root> You also have to pass the path to your custom transformation assembly as a value to the `TransformAssemblyPath` parameter. That's it! (Note: Carbon does *not* ship with any extra transformations.) When transforming a file, the XDT framework will write warnings and errors to the PowerShell error and warning stream. Informational and debug messages are written to the verbose stream (i.e. use the `Verbose` switch to see all the XDT log messages).</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Convert-XmlFile</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path of the XML file to convert.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>XdtPath</maml:name> <maml:description> <maml:para>The path to the XDT file.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Destination</maml:name> <maml:description> <maml:para>The destination XML file's path.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TransformAssemblyPath</maml:name> <maml:description> <maml:para>List of assemblies to load which contain custom transforms.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Overwrite the destination file if it exists.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Convert-XmlFile</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path of the XML file to convert.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>XdtXml</maml:name> <maml:description> <maml:para>The raw XDT XML to use.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">XmlDocument</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Destination</maml:name> <maml:description> <maml:para>The destination XML file's path.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TransformAssemblyPath</maml:name> <maml:description> <maml:para>List of assemblies to load which contain custom transforms.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Overwrite the destination file if it exists.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path of the XML file to convert.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>XdtPath</maml:name> <maml:description> <maml:para>The path to the XDT file.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Destination</maml:name> <maml:description> <maml:para>The destination XML file's path.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TransformAssemblyPath</maml:name> <maml:description> <maml:para>List of assemblies to load which contain custom transforms.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Overwrite the destination file if it exists.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>XdtXml</maml:name> <maml:description> <maml:para>The raw XDT XML to use.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">XmlDocument</command:parameterValue> <dev:type> <maml:name>XmlDocument</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Convert-XmlFile -Path ".\web.config" -XdtPath ".\web.debug.config" -Destination '\\webserver\wwwroot\web.config'</dev:code> <dev:remarks> <maml:para>Transforms `web.config` with the XDT in `web.debug.config` to a new file at `\\webserver\wwwroot\web.config`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>Convert-XmlFile -Path ".\web.config" -XdtXml "<configuration></maml:para> </maml:introduction> <dev:code><connectionStrings><add name=""MyConn"" xdt:Transform=""Insert"" /></connectionStrings></configuration>" -Destination '\\webserver\wwwroot\web.config'</dev:code> <dev:remarks> <maml:para>Transforms `web.config` with the given XDT XML to a new file at `\\webserver\wwwroot\web.config`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Convert-XmlFile -Path ".\web.config" -XdtPath ".\web.debug.config" -Destination '\\webserver\wwwroot\web.config' -Verbose</dev:code> <dev:remarks> <maml:para>See that `Verbose` switch? It will show informational/debug messages written by the XDT framework. Very helpful in debugging what XDT framework is doing.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Convert-XmlFile -Path ".\web.config" -XdtPath ".\web.debug.config" -Destination '\\webserver\wwwroot\web.config' -TransformAssemblyPath C:\Projects\CustomTransforms.dll</dev:code> <dev:remarks> <maml:para>Shows how to reference a custom transformation assembly. It should also be loaded in your XDT file via the `xdt:Import`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/dd465326.aspx</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://stackoverflow.com/questions/2915329/advanced-tasks-using-web-config-transformation</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Set-DotNetConnectionString</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Set-DotNetAppSetting</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>ConvertFrom-Base64</command:name> <maml:description> <maml:para>Converts a base-64 encoded string back into its original string.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>ConvertFrom</command:verb> <command:noun>Base64</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>For some reason. .NET makes encoding a string a two-step process. This function makes it a one-step process. You're actually allowed to pass in `$null` and an empty string. If you do, you'll get `$null` and an empty string back.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>ConvertFrom-Base64</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>Value</maml:name> <maml:description> <maml:para>The base-64 string to convert.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Encoding</maml:name> <maml:description> <maml:para>The encoding to use. Default is Unicode.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Encoding</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>Value</maml:name> <maml:description> <maml:para>The base-64 string to convert.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Encoding</maml:name> <maml:description> <maml:para>The encoding to use. Default is Unicode.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Encoding</command:parameterValue> <dev:type> <maml:name>Encoding</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <!-- Inputs--> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>ConvertFrom-Base64 -Value 'RW5jb2RlIG1lLCBwbGVhc2Uh'</dev:code> <dev:remarks> <maml:para>Decodes `RW5jb2RlIG1lLCBwbGVhc2Uh` back into its original string.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>ConvertFrom-Base64 -Value 'RW5jb2RlIG1lLCBwbGVhc2Uh' -Encoding ([Text.Encoding]::ASCII)</dev:code> <dev:remarks> <maml:para>Shows how to specify a custom encoding in case your string isn't in Unicode text encoding.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>'RW5jb2RlIG1lIQ==' | ConvertTo-Base64</dev:code> <dev:remarks> <maml:para>Shows how you can pipeline input into `ConvertFrom-Base64`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>ConvertTo-Base64</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>ConvertTo-Base64</command:name> <maml:description> <maml:para>Converts a value to base-64 encoding.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>ConvertTo</command:verb> <command:noun>Base64</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>For some reason. .NET makes encoding a string a two-step process. This function makes it a one-step process. You're actually allowed to pass in `$null` and an empty string. If you do, you'll get `$null` and an empty string back.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>ConvertTo-Base64</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>Value</maml:name> <maml:description> <maml:para>The value to base-64 encoding.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Encoding</maml:name> <maml:description> <maml:para>The encoding to use. Default is Unicode.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Encoding</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>Value</maml:name> <maml:description> <maml:para>The value to base-64 encoding.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Encoding</maml:name> <maml:description> <maml:para>The encoding to use. Default is Unicode.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Encoding</command:parameterValue> <dev:type> <maml:name>Encoding</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <!-- Inputs--> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>ConvertTo-Base64 -Value 'Encode me, please!'</dev:code> <dev:remarks> <maml:para>Encodes `Encode me, please!` into a base-64 string.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>ConvertTo-Base64 -Value 'Encode me, please!' -Encoding ([Text.Encoding]::ASCII)</dev:code> <dev:remarks> <maml:para>Shows how to specify a custom encoding in case your string isn't in Unicode text encoding.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>'Encode me!' | ConvertTo-Base64</dev:code> <dev:remarks> <maml:para>Converts `Encode me!` into a base-64 string.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>ConvertFrom-Base64</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>ConvertTo-ContainerInheritanceFlags</command:name> <maml:description> <maml:para>Converts a combination of InheritanceFlags Propagation Flags into a Carbon.Security.ContainerInheritanceFlags enumeration value.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>ConvertTo</command:verb> <command:noun>ContainerInheritanceFlags</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>`Grant-Permission`, `Test-Permission`, and `Get-Permission` all take an `ApplyTo` parameter, which is a `Carbon.Security.ContainerInheritanceFlags` enumeration value. This enumeration is then converted to the appropriate `System.Security.AccessControl.InheritanceFlags` and `System.Security.AccessControl.PropagationFlags` values for getting/granting/testing permissions. If you prefer to speak in terms of `InheritanceFlags` and `PropagationFlags`, use this function to convert them to a `ContainerInheritanceFlags` value. If your combination doesn't result in a valid combination, `$null` is returned. For detailed description of inheritance and propagation flags, see the help for `Grant-Permission`.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>ConvertTo-ContainerInheritanceFlags</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>InheritanceFlags</maml:name> <maml:description> <maml:para>The inheritance flags to convert.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">InheritanceFlags</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>PropagationFlags</maml:name> <maml:description> <maml:para>The propagation flags to convert.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PropagationFlags</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>InheritanceFlags</maml:name> <maml:description> <maml:para>The inheritance flags to convert.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">InheritanceFlags</command:parameterValue> <dev:type> <maml:name>InheritanceFlags</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>PropagationFlags</maml:name> <maml:description> <maml:para>The propagation flags to convert.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PropagationFlags</command:parameterValue> <dev:type> <maml:name>PropagationFlags</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>Carbon.Security.ContainerInheritanceFlags</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>ConvertTo-ContainerInheritanceFlags -InheritanceFlags 'ContainerInherit' -PropagationFlags 'None'</dev:code> <dev:remarks> <maml:para>Demonstrates how to convert `InheritanceFlags` and `PropagationFlags` enumeration values into a `ContainerInheritanceFlags`. In this case, `[Carbon.Security.ContainerInheritanceFlags]::ContainerAndSubContainers` is returned.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Grant-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>ConvertTo-InheritanceFlag</command:name> <maml:description> <maml:para>Converts a `Carbon.Security.ContainerInheritanceFlags` value to a `System.Security.AccessControl.InheritanceFlags` value.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>ConvertTo</command:verb> <command:noun>InheritanceFlag</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The `Carbon.Security.ContainerInheritanceFlags` enumeration encapsulates oth `System.Security.AccessControl.InheritanceFlags` and `System.Security.AccessControl.PropagationFlags`. Make sure you also call `ConvertTo-PropagationFlag` to get the propagation value.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>ConvertTo-InheritanceFlag</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>ContainerInheritanceFlag</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ContainerInheritanceFlags</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>ContainerInheritanceFlag</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ContainerInheritanceFlags</command:parameterValue> <dev:type> <maml:name>ContainerInheritanceFlags</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>ConvertTo-InheritanceFlag -ContainerInheritanceFlag ContainerAndSubContainersAndLeaves</dev:code> <dev:remarks> <maml:para>Returns `InheritanceFlags.ContainerInherit|InheritanceFlags.ObjectInherit`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>ConvertTo-PropagationFlag</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>ConvertTo-PropagationFlag</command:name> <maml:description> <maml:para>Converts a `Carbon.Security.ContainerInheritanceFlags` value to a `System.Security.AccessControl.PropagationFlags` value.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>ConvertTo</command:verb> <command:noun>PropagationFlag</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The `Carbon.Security.ContainerInheritanceFlags` enumeration encapsulates oth `System.Security.AccessControl.PropagationFlags` and `System.Security.AccessControl.InheritanceFlags`. Make sure you also call `ConvertTo-InheritancewFlags` to get the inheritance value.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>ConvertTo-PropagationFlag</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>ContainerInheritanceFlag</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ContainerInheritanceFlags</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>ContainerInheritanceFlag</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ContainerInheritanceFlags</command:parameterValue> <dev:type> <maml:name>ContainerInheritanceFlags</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>ConvertTo-PropagationFlag -ContainerInheritanceFlag ContainerAndSubContainersAndLeaves</dev:code> <dev:remarks> <maml:para>Returns `PropagationFlags.None`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>ConvertTo-InheritanceFlag</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Copy-DscResource</command:name> <maml:description> <maml:para>Copies DSC resources.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Copy</command:verb> <command:noun>DscResource</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>This function copies a DSC resource or a directory of DSC resources to a DSC pull server share/website. All files under `$Path` are copied. DSC requires all files have a checksum file (e.g. `localhost.mof.checksum`), which this function generates for you (in a temporary location). Only new files, or files whose checksums have changed, are copied. You can force all files to be copied with the `Force` switch.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Copy-DscResource</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the DSC resource to copy. If a directory is given, all files in that directory are copied. Wildcards supported.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Destination</maml:name> <maml:description> <maml:para>The directory where the resources should be copied.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Recurse</maml:name> <maml:description> <maml:para>Recursively copy files from the source directory.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PassThru</maml:name> <maml:description> <maml:para>Returns `IO.FileInfo` objects for each item copied to `Destination`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Copy resources, even if they are the same on the destination server.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the DSC resource to copy. If a directory is given, all files in that directory are copied. Wildcards supported.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Destination</maml:name> <maml:description> <maml:para>The directory where the resources should be copied.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Recurse</maml:name> <maml:description> <maml:para>Recursively copy files from the source directory.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PassThru</maml:name> <maml:description> <maml:para>Returns `IO.FileInfo` objects for each item copied to `Destination`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Copy resources, even if they are the same on the destination server.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.IO.FileInfo</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Copy-DscResource -Path 'localhost.mof' -Destination '\\dscserver\DscResources'</dev:code> <dev:remarks> <maml:para>Demonstrates how to copy a single resource to a resources SMB share. `localhost.mof` will only be copied if its checksum is different than what is in `\\dscserver\DscResources`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Copy-DscResource -Path 'C:\Projects\DscResources' -Destination '\\dscserver\DscResources'</dev:code> <dev:remarks> <maml:para>Demonstrates how to copy a directory of resources. Only files in the directory are copied. Every file in the source must have a `.checksum` file. Only files whose checksums are different between source and destination will be copied.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Copy-DscResource -Path 'C:\Projects\DscResources' -Destination '\\dscserver\DscResources' -Recurse</dev:code> <dev:remarks> <maml:para>Demonstrates how to recursively copy files.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Copy-DscResource -Path 'C:\Projects\DscResources' -Destination '\\dscserver\DscResources' -Force</dev:code> <dev:remarks> <maml:para>Demonstrates how to copy all files, even if their `.checksum` files are the same.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Copy-DscResource -Path 'C:\Projects\DscResources' -Destination '\\dscserver\DscResources' -PassThru</dev:code> <dev:remarks> <maml:para>Demonstrates how to get `System.IO.FileInfo` objects for all resources copied to the destination. If all files are up-to-date, nothing is copied, and no objects are returned.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Disable-FirewallStatefulFtp</command:name> <maml:description> <maml:para>Disables the `StatefulFtp` Windows firewall setting.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Disable</command:verb> <command:noun>FirewallStatefulFtp</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses the `netsh` command to disable the `StatefulFtp` Windows firewall setting. If the firewall isn't configurable, writes an error and returns without making any changes.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Disable-FirewallStatefulFtp</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Disable-FirewallStatefulFtp</dev:code> <dev:remarks> <maml:para>Disables the `StatefulFtp` Windows firewall setting.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Assert-FirewallConfigurable</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Disable-IEEnhancedSecurityConfiguration</command:name> <maml:description> <maml:para>Disables Internet Explorer's Enhanced Security Configuration.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Disable</command:verb> <command:noun>IEEnhancedSecurityConfiguration</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>By default, Windows locks down Internet Explorer so that users can't visit certain sites. This function disables that enhanced security. This is necessary if you have automated processes that need to run and interact with Internet Explorer. You may also need to call `Enable-IEActivationPermission`, so that processes have permission to start Internet Explorer.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Disable-IEEnhancedSecurityConfiguration</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Disable-IEEnhancedSecurityConfiguration</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://technet.microsoft.com/en-us/library/dd883248(v=WS.10).aspx</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Enable-IEActivationPermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Disable-IisSecurityAuthentication</command:name> <maml:description> <maml:para>Disables anonymous or basic authentication for all or part of a website.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Disable</command:verb> <command:noun>IisSecurityAuthentication</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>By default, disables an authentication type for an entire website. You can disable an authentication type at a specific path under a website by passing the virtual path (*not* the physical path) to that directory as the value of the `VirtualPath` parameter.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Disable-IisSecurityAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Anonymous</maml:name> <maml:description> <maml:para>Enable anonymouse authentication.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Disable-IisSecurityAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Basic</maml:name> <maml:description> <maml:para>Enable basic authentication.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Disable-IisSecurityAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Windows</maml:name> <maml:description> <maml:para>Enable Windows authentication.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Anonymous</maml:name> <maml:description> <maml:para>Enable anonymouse authentication.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Basic</maml:name> <maml:description> <maml:para>Enable basic authentication.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Windows</maml:name> <maml:description> <maml:para>Enable Windows authentication.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Disable-IisSecurityAuthentication -SiteName Peanuts -Anonymous</dev:code> <dev:remarks> <maml:para>Turns off anonymous authentication for the `Peanuts` website.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Disable-IisSecurityAuthentication -SiteName Peanuts Snoopy/DogHouse -Basic</dev:code> <dev:remarks> <maml:para>Turns off basic authentication for the `Snoopy/DogHouse` directory under the `Peanuts` website.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Enable-IisSecurityAuthentication</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-IisSecurityAuthentication</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-IisSecurityAuthentication</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Disable-NtfsCompression</command:name> <maml:description> <maml:para>Turns off NTFS compression on a file/directory.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Disable</command:verb> <command:noun>NtfsCompression</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>When disabling compression for a directory, any compressed files/directories in that directory will remain compressed. To decompress everything, use the `-Recurse` switch. This could take awhile. Uses Windows' `compact.exe` command line utility to compress the file/directory. To see the output from `compact.exe`, set the `Verbose` switch.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Disable-NtfsCompression</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path where compression should be disabled.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Recurse</maml:name> <maml:description> <maml:para>Disables compression on all sub-directories.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path where compression should be disabled.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Recurse</maml:name> <maml:description> <maml:para>Disables compression on all sub-directories.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <!-- Inputs--> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Disable-NtfsCompression -Path C:\Projects\Carbon</dev:code> <dev:remarks> <maml:para>Turns off NTFS compression on and decompresses the `C:\Projects\Carbon` directory, but not its sub-directories/files. New files/directories will get compressed.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Disable-NtfsCompression -Path C:\Projects\Carbon -Recurse</dev:code> <dev:remarks> <maml:para>Turns off NTFS compression on and decompresses the `C:\Projects\Carbon` directory and all its sub-directories/sub-files.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ChildItem * | Where-Object { $_.PsIsContainer } | Disable-NtfsCompression</dev:code> <dev:remarks> <maml:para>Demonstrates that you can pipe the path to compress into `Disable-NtfsCompression`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Enable-NtfsCompression</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-NtfsCompression</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Enable-FirewallStatefulFtp</command:name> <maml:description> <maml:para>Enables the `StatefulFtp` Windows firewall setting.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Enable</command:verb> <command:noun>FirewallStatefulFtp</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses the `netsh` command to enable the `StatefulFtp` Windows firewall setting. If the firewall isn't configurable, writes an error and returns without making any changes.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Enable-FirewallStatefulFtp</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Enable-FirewallStatefulFtp</dev:code> <dev:remarks> <maml:para>Enables the `StatefulFtp` Windows firewall setting.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Assert-FirewallConfigurable</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Enable-IEActivationPermission</command:name> <maml:description> <maml:para>Grants all users permission to start/launch Internet Explorer.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Enable</command:verb> <command:noun>IEActivationPermission</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>By default, unprivileged users can't launch/start Internet Explorer. This prevents those users from using Internet Explorer to run automated, browser-based tests. This function modifies Windows so that all users can launch Internet Explorer. You may also need to call Disable-IEEnhancedSecurityConfiguration, so that Internet Explorer is allowed to visit all websites.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Enable-IEActivationPermission</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Enable-IEActivationPermission</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Disable-IEEnhancedSecurityConfiguration</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Enable-IisDirectoryBrowsing</command:name> <maml:description> <maml:para>Enables directory browsing under all or part of a website.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Enable</command:verb> <command:noun>IisDirectoryBrowsing</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Enables directory browsing (i.e. showing the contents of a directory by requesting that directory in a web browser) for a website. To enable directory browsing on a directory under the website, pass the virtual path to that directory as the value to the `Directory` parameter.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Enable-IisDirectoryBrowsing</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the site where the virtual directory is located.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The directory where directory browsing should be enabled.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the site where the virtual directory is located.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The directory where directory browsing should be enabled.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Enable-IisDirectoryBrowsing -SiteName Peanuts</dev:code> <dev:remarks> <maml:para>Enables directory browsing on the `Peanuts` website.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Enable-IisDirectoryBrowsing -SiteName Peanuts -Directory Snoopy/DogHouse</dev:code> <dev:remarks> <maml:para>Enables directory browsing on the `/Snoopy/DogHouse` directory under the `Peanuts` website.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Enable-IisSecurityAuthentication</command:name> <maml:description> <maml:para>Enables anonymous or basic authentication for an entire site or a sub-directory of that site.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Enable</command:verb> <command:noun>IisSecurityAuthentication</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>By default, enables an authentication type on an entire website. You can enable an authentication type at a specific path under a website by passing the virtual path (*not* the physical path) to that directory as the value of the `VirtualPath` parameter.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Enable-IisSecurityAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Anonymous</maml:name> <maml:description> <maml:para>Enable anonymouse authentication.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Enable-IisSecurityAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Basic</maml:name> <maml:description> <maml:para>Enable basic authentication.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Enable-IisSecurityAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Windows</maml:name> <maml:description> <maml:para>Enable Windows authentication.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Anonymous</maml:name> <maml:description> <maml:para>Enable anonymouse authentication.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Basic</maml:name> <maml:description> <maml:para>Enable basic authentication.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Windows</maml:name> <maml:description> <maml:para>Enable Windows authentication.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Enable-IisSecurityAuthentication -SiteName Peanuts -Anonymous</dev:code> <dev:remarks> <maml:para>Turns on anonymous authentication for the `Peanuts` website.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Enable-IisSecurityAuthentication -SiteName Peanuts Snoopy/DogHouse -Basic</dev:code> <dev:remarks> <maml:para>Turns on anonymous authentication for the `Snoopy/DogHouse` directory under the `Peanuts` website.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Disable-IisSecurityAuthentication</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-IisSecurityAuthentication</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-IisSecurityAuthentication</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Enable-IisSsl</command:name> <maml:description> <maml:para>Turns on and configures SSL for a website or part of a website.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Enable</command:verb> <command:noun>IisSsl</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>This function enables SSL and optionally the site/directory to: * Require SSL (the `RequireSsl` switch) * Ignore/accept/require client certificates (the `AcceptClientCertificates` and `RequireClientCertificates` switches). * Requiring 128-bit SSL (the `Require128BitSsl` switch). By default, this function will enable SSL, make SSL connections optional, ignores client certificates, and not require 128-bit SSL. Changing any SSL settings will do you no good if the website doesn't have an SSL binding or doesn't have an SSL certificate. The configuration will most likely succeed, but won't work in a browser. So sad. Beginning with IIS 7.5, the `Require128BitSsl` parameter won't actually change the behavior of a website since [there are no longer 128-bit crypto providers](https://forums.iis.net/p/1163908/1947203.aspx) in versions of Windows running IIS 7.5.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Enable-IisSsl</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The website whose SSL flags should be modifed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The path to the folder/virtual directory/application under the website whose SSL flags should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RequireSsl</maml:name> <maml:description> <maml:para>Should SSL be required?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Require128BitSsl</maml:name> <maml:description> <maml:para>Requires 128-bit SSL. Only changes IIS behavior in IIS 7.0.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Enable-IisSsl</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The website whose SSL flags should be modifed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The path to the folder/virtual directory/application under the website whose SSL flags should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RequireSsl</maml:name> <maml:description> <maml:para>Should SSL be required?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Require128BitSsl</maml:name> <maml:description> <maml:para>Requires 128-bit SSL. Only changes IIS behavior in IIS 7.0.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RequireClientCertificates</maml:name> <maml:description> <maml:para>Should client certificates be required? Also requires SSL ('RequireSsl` switch).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Enable-IisSsl</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The website whose SSL flags should be modifed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The path to the folder/virtual directory/application under the website whose SSL flags should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RequireSsl</maml:name> <maml:description> <maml:para>Should SSL be required?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Require128BitSsl</maml:name> <maml:description> <maml:para>Requires 128-bit SSL. Only changes IIS behavior in IIS 7.0.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AcceptClientCertificates</maml:name> <maml:description> <maml:para>Should client certificates be accepted?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The website whose SSL flags should be modifed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The path to the folder/virtual directory/application under the website whose SSL flags should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RequireSsl</maml:name> <maml:description> <maml:para>Should SSL be required?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Require128BitSsl</maml:name> <maml:description> <maml:para>Requires 128-bit SSL. Only changes IIS behavior in IIS 7.0.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RequireClientCertificates</maml:name> <maml:description> <maml:para>Should client certificates be required? Also requires SSL ('RequireSsl` switch).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AcceptClientCertificates</maml:name> <maml:description> <maml:para>Should client certificates be accepted?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Enable-IisSsl -Site Peanuts</dev:code> <dev:remarks> <maml:para>Enables SSL on the `Peanuts` website's, making makes SSL connections optional, ignoring client certificates, and making 128-bit SSL optional.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Enable-IisSsl -Site Peanuts -VirtualPath Snoopy/DogHouse -RequireSsl</dev:code> <dev:remarks> <maml:para>Configures the `/Snoopy/DogHouse` directory in the `Peanuts` site to require SSL. It also turns off any client certificate settings and makes 128-bit SSL optional.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Enable-IisSsl -Site Peanuts -AcceptClientCertificates</dev:code> <dev:remarks> <maml:para>Enables SSL on the `Peanuts` website and configures it to accept client certificates, makes SSL optional, and makes 128-bit SSL optional.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Enable-IisSsl -Site Peanuts -RequireSsl -RequireClientCertificates</dev:code> <dev:remarks> <maml:para>Enables SSL on the `Peanuts` website and configures it to require SSL and client certificates. You can't require client certificates without also requiring SSL.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Enable-IisSsl -Site Peanuts -Require128BitSsl</dev:code> <dev:remarks> <maml:para>Enables SSL on the `Peanuts` website and require 128-bit SSL. Also, makes SSL connections optional and ignores client certificates.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://support.microsoft.com/?id=907274</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Set-IisWebsiteSslCertificate</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Enable-NtfsCompression</command:name> <maml:description> <maml:para>Turns on NTFS compression on a file/directory.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Enable</command:verb> <command:noun>NtfsCompression</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>By default, when enabling compression on a directory, only new files/directories created *after* enabling compression will be compressed. To compress everything, use the `-Recurse` switch. Uses Windows' `compact.exe` command line utility to compress the file/directory. To see the output from `compact.exe`, set the `Verbose` switch.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Enable-NtfsCompression</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path where compression should be enabled.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Recurse</maml:name> <maml:description> <maml:para>Enables compression on all sub-directories.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path where compression should be enabled.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Recurse</maml:name> <maml:description> <maml:para>Enables compression on all sub-directories.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <!-- Inputs--> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Enable-NtfsCompression -Path C:\Projects\Carbon</dev:code> <dev:remarks> <maml:para>Turns on NTFS compression on and compresses the `C:\Projects\Carbon` directory, but not its sub-directories.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Enable-NtfsCompression -Path C:\Projects\Carbon -Recurse</dev:code> <dev:remarks> <maml:para>Turns on NTFS compression on and compresses the `C:\Projects\Carbon` directory and all its sub-directories.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ChildItem * | Where-Object { $_.PsIsContainer } | Enable-NtfsCompression</dev:code> <dev:remarks> <maml:para>Demonstrates that you can pipe the path to compress into `Enable-NtfsCompression`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Disable-NtfsCompression</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-NtfsCompression</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Expand-Item</command:name> <maml:description> <maml:para>Decompresses a ZIP file to a directory using the `DotNetZip` library.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Expand</command:verb> <command:noun>Item</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The contents of the ZIP file are extracted to a temporary directory, and that directory is returned as a `System.IO.DirectoryInfo` object. You are responsible for deleting that directory when you're finished. You can extract to a specific directory with the `OutDirectory` parameter. If the directory doesn't exist, it is created. If the directory exists, and is empty, the file is decompressed into that directory. If the directory isn't empty, use the `-Force` parameter to overwrite any files/directories which may be present. The directory where the files were decompressed is returned.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Expand-Item</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the files/directories to compress.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>OutDirectory</maml:name> <maml:description> <maml:para>Path to a directory where the file should be extracted.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Overwrite any existing files/directories in `OutDirectory`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the files/directories to compress.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>OutDirectory</maml:name> <maml:description> <maml:para>Path to a directory where the file should be extracted.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Overwrite any existing files/directories in `OutDirectory`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.IO.DirectoryInfo</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>$unzipRoot = Expand-Item -Path 'C:\Carbon.zip'</dev:code> <dev:remarks> <maml:para>Demonstrates how to unzip a file into a temporary directory. You are responsible for deleting that directory.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Expand-Item -Path 'C:\Carbon.zip' -OutDirectory 'C:\Modules\Carbon'</dev:code> <dev:remarks> <maml:para>Demonstrates how to unzip a file into a specific directory.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Expand-Item -Path 'C:\Carbon.zip' -OutDirectory 'C:\Modules\Carbon' -Force</dev:code> <dev:remarks> <maml:para>Demonstrates how to decompress to an existing, non-empty directory with the `-Force` parameter. Existing files are overwritten.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>https://www.nuget.org/packages/DotNetZip</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Compress-Item</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-ZipFile</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Find-ADUser</command:name> <maml:description> <maml:para>Finds a user in Active Directory.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Find</command:verb> <command:noun>ADUser</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Searches the Active Directory domain given by `DomainUrl` for a user whose `sAMAccountName` matches the `sAMAccountName` passed in. Returns the `DirectoryEntry` object for that user. If there are any errors communicating with the domain controller, `$null` is returned.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Find-ADUser</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DomainUrl</maml:name> <maml:description> <maml:para>The LDAP URL to the domain controller to contact.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>sAMAccountName</maml:name> <maml:description> <maml:para>Search by a user's sAMAcountName (i.e. Windows username). Special characters are escaped.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DomainUrl</maml:name> <maml:description> <maml:para>The LDAP URL to the domain controller to contact.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>sAMAccountName</maml:name> <maml:description> <maml:para>Search by a user's sAMAcountName (i.e. Windows username). Special characters are escaped.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Find-ADUser -DomainUrl LDAP://dc.example.com:389 -sAMAccountName $env:USERNAME</dev:code> <dev:remarks> <maml:para>Finds the AD user whose Windows username (sAMAccountName) is equal to thecurrently logged on user's username.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/aa746475.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Format-ADSearchFilterValue</command:name> <maml:description> <maml:para>Escapes Active Directory special characters from a string.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Format</command:verb> <command:noun>ADSearchFilterValue</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>There are special characters in Active Directory queries/searches. This function escapes them so they aren't treated as AD commands/characters.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Format-ADSearchFilterValue</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>String</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>String</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Format-ADSearchFilterValue -String "I have AD special characters (I think)."</dev:code> <dev:remarks> <maml:para>Returns I have AD special characters \28I think\29.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/aa746475.aspx#special_characters</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-ADDomainController</command:name> <maml:description> <maml:para>Gets the domain controller of the current computer's domain, or for a specific domain.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>ADDomainController</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>When working with Active Directory, it's important to have the hostname of the domain controller you need to work with. This function will find the domain controller for the domain of the current computer or the domain controller for a given domain.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-ADDomainController</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Domain</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Domain</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>></maml:para> </maml:introduction> <dev:code>Get-ADDomainController</dev:code> <dev:remarks> <maml:para>Returns the domain controller for the current computer's domain. Approximately equivialent to the hostname given in the LOGONSERVER environment variable.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>></maml:para> </maml:introduction> <dev:code>Get-ADDomainController -Domain MYDOMAIN</dev:code> <dev:remarks> <maml:para>Returns the domain controller for the MYDOMAIN domain.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-Certificate</command:name> <maml:description> <maml:para>Gets a certificate from a file on the file system or from a Windows certificate store by thumbprint or friendly name.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>Certificate</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Certificates can be files or they can be in a Windows certificate store. This function returns an `X509Certificate2` object for a script that's a file on the file system or a cert stored in Microsoft's certificate store. You can get a certificate from a certificate store with its unique thumbprint or its friendly name. Friendly names are *not* required to be unique, so you may get multiple certificates when using that search method. Certificates loaded from a file are imported with default key storage values, which means if you try to add the certifiate returned by this function to a certificate store it will get persisted in the user's key store and *not* persisted.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-Certificate</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FriendlyName</maml:name> <maml:description> <maml:para>The friendly name of the certificate.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreName</maml:name> <maml:description> <maml:para>The name of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreName</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-Certificate</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the certificate. Can be a file system path or a certificate path, e.g. `cert:\`. Wildcards supported.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password to the certificate. Can be plaintext or a [SecureString](http://ms dn.microsoft.com/en-us/library/system.securestring.aspx).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Object</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>KeyStorageFlags</maml:name> <maml:description> <maml:para>The storage flags to use when loading a certificate file. This controls where/how you can store the certificate in the certificate stores later. Use the `-bor` operator to combine flags.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">X509KeyStorageFlags</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-Certificate</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Thumbprint</maml:name> <maml:description> <maml:para>The certificate's thumbprint.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CustomStoreName</maml:name> <maml:description> <maml:para>The name of the non-standard, custom store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-Certificate</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Thumbprint</maml:name> <maml:description> <maml:para>The certificate's thumbprint.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreName</maml:name> <maml:description> <maml:para>The name of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreName</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-Certificate</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FriendlyName</maml:name> <maml:description> <maml:para>The friendly name of the certificate.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CustomStoreName</maml:name> <maml:description> <maml:para>The name of the non-standard, custom store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FriendlyName</maml:name> <maml:description> <maml:para>The friendly name of the certificate.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> <dev:type> <maml:name>StoreLocation</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreName</maml:name> <maml:description> <maml:para>The name of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreName</command:parameterValue> <dev:type> <maml:name>StoreName</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the certificate. Can be a file system path or a certificate path, e.g. `cert:\`. Wildcards supported.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password to the certificate. Can be plaintext or a [SecureString](http://ms dn.microsoft.com/en-us/library/system.securestring.aspx).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Object</command:parameterValue> <dev:type> <maml:name>Object</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>KeyStorageFlags</maml:name> <maml:description> <maml:para>The storage flags to use when loading a certificate file. This controls where/how you can store the certificate in the certificate stores later. Use the `-bor` operator to combine flags.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">X509KeyStorageFlags</command:parameterValue> <dev:type> <maml:name>X509KeyStorageFlags</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Thumbprint</maml:name> <maml:description> <maml:para>The certificate's thumbprint.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CustomStoreName</maml:name> <maml:description> <maml:para>The name of the non-standard, custom store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.Security.Cryptography.X509Certificates.X509Certificate2</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-Certificate -Path C:\Certificates\certificate.cer -Password MySuperSecurePassword</dev:code> <dev:remarks> <maml:para>Gets an X509Certificate2 object representing the certificate.cer file. Wildcards *not* supported when using a file system path.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-Certificate -Thumbprint a909502dd82ae41433e6f83886b00d4277a32a7b -StoreName My -StoreLocation LocalMachine</dev:code> <dev:remarks> <maml:para>Gets an X509Certificate2 object for the certificate in the Personal store with a specific thumbprint under the Local Machine.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-Certificate -FriendlyName 'Development Certificate' -StoreLocation CurrentUser -StoreName TrustedPeople</dev:code> <dev:remarks> <maml:para>Gets the X509Certificate2 whose friendly name is Development Certificate from the Current User's Trusted People certificate store.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-Certificate -Thumbprint a909502dd82ae41433e6f83886b00d4277a32a7b -CustomStoreName 'SharePoint' -StoreLocation LocalMachine</dev:code> <dev:remarks> <maml:para>Demonstrates how to get a certificate from a custom store, i.e. one that is not part of the standard `StoreName` enumeration.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-Certificate -Path 'cert:\CurrentUser\a909502dd82ae41433e6f83886b00d4277a32a7b'</dev:code> <dev:remarks> <maml:para>Demonstrates how to get a certificate out of a Windows certificate store with its certificate path. Wildcards supported.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-CertificateStore</command:name> <maml:description> <maml:para>Gets an `X509CertificateStore` object for the given location and store name.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>CertificateStore</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns an `X509Store` for a given store location and store name. The store must exist. Before being retured, it is opened for writing. If you don't have permission to write to the store, you'll get an error. If you just want to read a store, we recommend using PowerShell's `cert:` drive.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-CertificateStore</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate store to get.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreName</maml:name> <maml:description> <maml:para>The name of the certificate store to get.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreName</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-CertificateStore</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate store to get.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CustomStoreName</maml:name> <maml:description> <maml:para>The name of the non-standard certificate store to get. Use this to pull certificates from a non-standard store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate store to get.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> <dev:type> <maml:name>StoreLocation</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreName</maml:name> <maml:description> <maml:para>The name of the certificate store to get.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreName</command:parameterValue> <dev:type> <maml:name>StoreName</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CustomStoreName</maml:name> <maml:description> <maml:para>The name of the non-standard certificate store to get. Use this to pull certificates from a non-standard store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-CertificateStore -StoreLocation LocalMachine -StoreName My</dev:code> <dev:remarks> <maml:para>Get the local computer's Personal certificate store.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-CertificateStore -StoreLocation CurrentUser -StoreName Root</dev:code> <dev:remarks> <maml:para>Get the current user's Trusted Root Certification Authorities certificate store.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-ComPermission</command:name> <maml:description> <maml:para>Gets the COM Access or Launch and Activation permissions for the current computer.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>ComPermission</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>COM access permissions ared used to "allow default access to application" or "set limits on applications that determine their own permissions". Launch and Activation permissions are used "who is allowed to launch applications or activate objects" and to "set limits on applications that determine their own permissions." Usually, these permissions are viewed and edited by opening dcomcnfg, right-clicking My Computer under Component Services > Computers, choosing Properties, going to the COM Security tab, and clicking `Edit Default...` or `Edit Limits...` buttons under the **Access Permissions** or **Launch and Activation Permissions** sections. This function does all that, but does it much easier, and returns objects you can work with. These permissions are stored in the registry, under `HKLM\Software\Microsoft\Ole`. The default security registry value for Access Permissions is missing/empty until custom permissions are granted. If this is the case, this function will return objects that represent the default security, which was lovingly reverse engineered by gnomes. Returns `Carbon.Security.ComAccessRule` objects, which inherit from `[System.Sec urity.AccessControl.AccessRule](http://msdn.microsoft.com/en-us/library/system.s ecurity.accesscontrol.accessrule.aspx).</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Access</maml:name> <maml:description> <maml:para>If set, returns permissions for COM Access permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Limits</maml:name> <maml:description> <maml:para>Gets security limit permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity whose access rule to return. If not set, all access rules are returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Access</maml:name> <maml:description> <maml:para>If set, returns permissions for COM Access permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Default</maml:name> <maml:description> <maml:para>Gets default security permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity whose access rule to return. If not set, all access rules are returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LaunchAndActivation</maml:name> <maml:description> <maml:para>If set, returns permissions for COM Access permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Limits</maml:name> <maml:description> <maml:para>Gets security limit permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity whose access rule to return. If not set, all access rules are returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LaunchAndActivation</maml:name> <maml:description> <maml:para>If set, returns permissions for COM Access permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Default</maml:name> <maml:description> <maml:para>Gets default security permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity whose access rule to return. If not set, all access rules are returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Access</maml:name> <maml:description> <maml:para>If set, returns permissions for COM Access permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Limits</maml:name> <maml:description> <maml:para>Gets security limit permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity whose access rule to return. If not set, all access rules are returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Default</maml:name> <maml:description> <maml:para>Gets default security permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LaunchAndActivation</maml:name> <maml:description> <maml:para>If set, returns permissions for COM Access permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ComPermission -Access -Default</dev:code> <dev:remarks> <maml:para>Gets the COM access default security permissions. Look how easy it is!</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ComPermission -LaunchAndActivation -Identity 'Administrators' -Limits</dev:code> <dev:remarks> <maml:para>Gets the security limits for COM Launch and Activation permissions for the local administrators group.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Grant-ComPermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Revoke-ComPermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-ComSecurityDescriptor</command:name> <maml:description> <maml:para>Gets a WMI Win32_SecurityDescriptor default security or security limits object for COM Access or Launch and Activation permissions.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>ComSecurityDescriptor</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>There are four available security descriptors. Default security and security limits for Access Permissions and Launch and Activation Permissions. This method returns a Win32_SecurityDescriptor for the given area and security type. The `AsComAccessRule` parameter will return a `Carbon.Security.ComAccessRule` object for each of the access control entries in the security descriptor's ACL.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-ComSecurityDescriptor</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Access</maml:name> <maml:description> <maml:para>Returns a securty descriptor for one of the Access Permissions security types.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Limits</maml:name> <maml:description> <maml:para>Returns the security limits descriptor.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AsComAccessRule</maml:name> <maml:description> <maml:para>Returns `Carbon.Security.ComAccessRule` objects instead of a security descriptor.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-ComSecurityDescriptor</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Access</maml:name> <maml:description> <maml:para>Returns a securty descriptor for one of the Access Permissions security types.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Default</maml:name> <maml:description> <maml:para>Returns the default security descriptor.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AsComAccessRule</maml:name> <maml:description> <maml:para>Returns `Carbon.Security.ComAccessRule` objects instead of a security descriptor.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-ComSecurityDescriptor</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LaunchAndActivation</maml:name> <maml:description> <maml:para>Returns a security descriptor for one of the Launch and Activation Permissions security types.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Limits</maml:name> <maml:description> <maml:para>Returns the security limits descriptor.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AsComAccessRule</maml:name> <maml:description> <maml:para>Returns `Carbon.Security.ComAccessRule` objects instead of a security descriptor.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-ComSecurityDescriptor</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LaunchAndActivation</maml:name> <maml:description> <maml:para>Returns a security descriptor for one of the Launch and Activation Permissions security types.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Default</maml:name> <maml:description> <maml:para>Returns the default security descriptor.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AsComAccessRule</maml:name> <maml:description> <maml:para>Returns `Carbon.Security.ComAccessRule` objects instead of a security descriptor.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Access</maml:name> <maml:description> <maml:para>Returns a securty descriptor for one of the Access Permissions security types.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Limits</maml:name> <maml:description> <maml:para>Returns the security limits descriptor.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AsComAccessRule</maml:name> <maml:description> <maml:para>Returns `Carbon.Security.ComAccessRule` objects instead of a security descriptor.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Default</maml:name> <maml:description> <maml:para>Returns the default security descriptor.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LaunchAndActivation</maml:name> <maml:description> <maml:para>Returns a security descriptor for one of the Launch and Activation Permissions security types.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ComSecurityDescriptor -Access -Default</dev:code> <dev:remarks> <maml:para>Gets the default security descriptor for COM Access Permissions.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ComSecurityDescriptor -Access -Limits</dev:code> <dev:remarks> <maml:para>Gets the security limits descriptor for COM Access Permissions.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ComSecurityDescriptor -LaunchAndActivation -Default</dev:code> <dev:remarks> <maml:para>Gets the default security descriptor for COM Launch and Activation Permissions.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ComSecurityDescriptor -LaunchAndActivation -Limits</dev:code> <dev:remarks> <maml:para>Gets the security limits descriptor for COM Launch and Activation Permissions.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ComSecurityDescriptor -Access -Default -AsComAccessRule</dev:code> <dev:remarks> <maml:para>Returns a `Carbon.Security.ComAccessRule` object for each of the access control entries in the Access Permissions's default security descriptor.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/windows/desktop/aa394402.aspx</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-ComPermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-DscError</command:name> <maml:description> <maml:para>Gets DSC errors from a computer's event log.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>DscError</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The DSC Local Configuration Manager (LCM) writes any errors it encounters to the `Microsoft-Windows-DSC/Operational` event log, in addition to some error messages that report that encountered an error. This function gets just the important error log messages, skipping the superflous ones that won't help you track down where the problem is. By default, errors on the local computer are returned. You can return errors from another computer via the `ComputerName` parameter. You can filter the results further with the `StartTime` and `EndTime` parameters. `StartTime` will return entries after the given time. `EndTime` will return entries before the given time. If no items are found, nothing is returned. It can take several seconds for event log entries to get written to the log, so you might not get results back. If you want to wait for entries to come back, use the `-Wait` switch. You can control how long to wait (in seconds) via the `WaitTimeoutSeconds` parameter. The default is 10 seconds. When getting errors on a remote computer, that computer must have Remote Event Log Management firewall rules enabled. To enable them, run Get-FirewallRule -Name '*Remove Event Log Management*' | ForEach-Object { netsh advfirewall firewall set rule name= $_.Name new enable=yes }</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-DscError</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The computer whose DSC errors to return.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>Get errors that occurred after this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>Get errors that occurred before this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-DscError</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The computer whose DSC errors to return.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>Get errors that occurred after this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>Get errors that occurred before this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Wait</maml:name> <maml:description> <maml:para>Wait for entries to appear, as it can sometimes take several seconds for entries to get written to the event log.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>WaitTimeoutSeconds</maml:name> <maml:description> <maml:para>The time to wait for entries to appear before giving up. Default is 10 seconds. There is no way to wait an infinite amount of time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">UInt32</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The computer whose DSC errors to return.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>Get errors that occurred after this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> <dev:type> <maml:name>DateTime</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>Get errors that occurred before this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> <dev:type> <maml:name>DateTime</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Wait</maml:name> <maml:description> <maml:para>Wait for entries to appear, as it can sometimes take several seconds for entries to get written to the event log.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>WaitTimeoutSeconds</maml:name> <maml:description> <maml:para>The time to wait for entries to appear before giving up. Default is 10 seconds. There is no way to wait an infinite amount of time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">UInt32</command:parameterValue> <dev:type> <maml:name>UInt32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.Diagnostics.Eventing.Reader.EventLogRecord</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-DscWinEvent</dev:code> <dev:remarks> <maml:para>Demonstrates how to get all the DSC errors from the local computer.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-DscError -ComputerName 10.1.2.3</dev:code> <dev:remarks> <maml:para>Demonstrates how to get all the DSC errors from a specific computer.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-DscError -StartTime '8/1/2014 0:00'</dev:code> <dev:remarks> <maml:para>Demonstrates how to get errors that occurred *after* a given time.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-DscError -EndTime '8/30/2014 11:59:59'</dev:code> <dev:remarks> <maml:para>Demonstrates how to get errors that occurred *before* a given time.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-DscError -StartTime '8/1/2014 2:58 PM' -Wait -WaitTimeoutSeconds 5</dev:code> <dev:remarks> <maml:para>Demonstrates how to wait for entries that match the specified criteria to appear in the event log. It can take several seconds between the time a log entry is written to when you can read it.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Write-DscError</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-DscWinEvent</command:name> <maml:description> <maml:para>Gets events from the DSC Windows event log.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>DscWinEvent</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Thie `Get-DscWinEvent` function gets log entries from the `Microsoft-Windows-DSC/Operational` event log, where the Local Configuration Manager writes events. By default, entries on the local computer are returned. You can return entries from another computer via the `ComputerName` parameter. You can filter the results further with the `ID`, `Level`, `StartTime` and `EndTime` parameters. `ID` will get events with the specific ID. `Level` will get events at the specified level. `StartTime` will return entries after the given time. `EndTime` will return entries before the given time. If no items are found, nothing is returned. It can take several seconds for event log entries to get written to the log, so you might not get results back. If you want to wait for entries to come back, use the `-Wait` switch. You can control how long to wait (in seconds) via the `WaitTimeoutSeconds` parameter. The default is 10 seconds. When getting errors on a remote computer, that computer must have Remote Event Log Management firewall rules enabled. To enable them, run Get-FirewallRule -Name '*Remove Event Log Management*' | ForEach-Object { netsh advfirewall firewall set rule name= $_.Name new enable=yes }</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-DscWinEvent</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The computer whose DSC errors to return.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ID</maml:name> <maml:description> <maml:para>The event ID. Only events with this ID will be returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Level</maml:name> <maml:description> <maml:para>The level. Only events at this level will be returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>Get errors that occurred after this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>Get errors that occurred before this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-DscWinEvent</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The computer whose DSC errors to return.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ID</maml:name> <maml:description> <maml:para>The event ID. Only events with this ID will be returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Level</maml:name> <maml:description> <maml:para>The level. Only events at this level will be returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>Get errors that occurred after this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>Get errors that occurred before this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Wait</maml:name> <maml:description> <maml:para>Wait for entries to appear, as it can sometimes take several seconds for entries to get written to the event log.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>WaitTimeoutSeconds</maml:name> <maml:description> <maml:para>The time to wait for entries to appear before giving up. Default is 10 seconds. There is no way to wait an infinite amount of time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">UInt32</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The computer whose DSC errors to return.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ID</maml:name> <maml:description> <maml:para>The event ID. Only events with this ID will be returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Level</maml:name> <maml:description> <maml:para>The level. Only events at this level will be returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>Get errors that occurred after this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> <dev:type> <maml:name>DateTime</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>Get errors that occurred before this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> <dev:type> <maml:name>DateTime</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Wait</maml:name> <maml:description> <maml:para>Wait for entries to appear, as it can sometimes take several seconds for entries to get written to the event log.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>WaitTimeoutSeconds</maml:name> <maml:description> <maml:para>The time to wait for entries to appear before giving up. Default is 10 seconds. There is no way to wait an infinite amount of time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">UInt32</command:parameterValue> <dev:type> <maml:name>UInt32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.Diagnostics.Eventing.Reader.EventLogRecord</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-DscWinEvent</dev:code> <dev:remarks> <maml:para>Demonstrates how to get all the DSC errors from the local computer.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-DscWinEvent -ComputerName 10.1.2.3</dev:code> <dev:remarks> <maml:para>Demonstrates how to get all the DSC errors from a specific computer.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-DscWinEvent -StartTime '8/1/2014 0:00'</dev:code> <dev:remarks> <maml:para>Demonstrates how to get errors that occurred *after* a given time.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-DscWinEvent -EndTime '8/30/2014 11:59:59'</dev:code> <dev:remarks> <maml:para>Demonstrates how to get errors that occurred *before* a given time.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-DscWinEvent -StartTime '8/1/2014 2:58 PM' -Wait -WaitTimeoutSeconds 5</dev:code> <dev:remarks> <maml:para>Demonstrates how to wait for entries that match the specified criteria to appear in the event log. It can take several seconds between the time a log entry is written to when you can read it.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 6 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-DscWinEvent -Level ([Diagnostics.Eventing.Reader.StandardEventLevel]::Error)</dev:code> <dev:remarks> <maml:para>Demonstrates how to get events at a specific level, in this case, only error level entries will be returned.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 7 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-DscWinEvent -ID 4103</dev:code> <dev:remarks> <maml:para>Demonstrates how to get events with a specific ID, in this case `4103`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Write-DscError</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-DscWinEvent</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-FirewallRule</command:name> <maml:description> <maml:para>Gets the local computer's firewall rules.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>FirewallRule</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns a `Carbon.Firewall.Rule` object for each firewall rule on the local computer. This data is parsed from the output of: netsh advfirewall firewall show rule name=all. You can return specific rule(s) using the `Name` or `LiteralName` parameters. The `Name` parameter accepts wildcards; `LiteralName` does not. There can be multiple firewall rules with the same name. If the firewall isn't configurable/running, writes an error and returns without returning any objects.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-FirewallRule</maml:name> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-FirewallRule</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the rule. Wildcards supported. Names aren't unique, so you may still get back multiple rules</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-FirewallRule</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LiteralName</maml:name> <maml:description> <maml:para>The literal name of the rule. Wildcards not supported.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the rule. Wildcards supported. Names aren't unique, so you may still get back multiple rules</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LiteralName</maml:name> <maml:description> <maml:para>The literal name of the rule. Wildcards not supported.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>Carbon.Firewall.Rule</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-FirewallRule</dev:code> <dev:remarks> <maml:para>Demonstrates how to get the firewall rules running on the current computer.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-FirewallRule -Name 'World Wide Web Services (HTTP Traffic-In)'</dev:code> <dev:remarks> <maml:para>Demonstrates how to get a specific rule.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-FirewallRule -Name '*HTTP*'</dev:code> <dev:remarks> <maml:para>Demonstrates how to use wildcards to find rules whose names match a wildcard pattern, in this case any rule whose name contains the text 'HTTP' is returned.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-FirewallRule -LiteralName 'Custom Rule **CREATED BY AUTOMATED PROCES'</dev:code> <dev:remarks> <maml:para>Demonstrates how to find a specific firewall rule by name if that name has wildcard characters in it.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Assert-FirewallConfigurable</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Carbon_FirewallRule</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-Group</command:name> <maml:description> <maml:para>Gets *local* groups.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>Group</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Gets all *local* groups or a specific group by its name.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-Group</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.DirectoryServices.AccountManagement.GroupPrincipal</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-Group</dev:code> <dev:remarks> <maml:para>Demonstrates how to get all local groups.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-Group -Name RebelAlliance</dev:code> <dev:remarks> <maml:para>Demonstrates how to get a specific group.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-User</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-IisApplication</command:name> <maml:description> <maml:para>Gets an IIS application as an `Application` object.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>IisApplication</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses the `Microsoft.Web.Administration` API to get an IIS application object. If the application doesn't exist, `$null` is returned. The objects returned have two dynamic properties and one dynamic methods added. * `ServerManager { get; }` - The `ServerManager` object which created the `Application` object. * `CommitChanges()` - Persists any configuration changes made to the object back into IIS's configuration files. * `PhysicalPath { get; }` - The physical path to the application.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-IisApplication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where the application is running.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The name of the application. Default is to return all applications running under the website `$SiteName`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where the application is running.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The name of the application. Default is to return all applications running under the website `$SiteName`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisApplication -SiteName 'DeathStar`</dev:code> <dev:remarks> <maml:para>Gets all the applications running under the `DeathStar` website.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisApplication -SiteName 'DeathStar' -VirtualPath '/'</dev:code> <dev:remarks> <maml:para>Demonstrates how to get the main application for a website: use `/` as the application name.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisApplication -SiteName 'DeathStar' -VirtualPath 'MainPort/ExhaustPort'</dev:code> <dev:remarks> <maml:para>Demonstrates how to get a nested application, i.e. gets the application at `/MainPort/ExhaustPort` under the `DeathStar` website.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-IisAppPool</command:name> <maml:description> <maml:para>Gets a `Microsoft.Web.Administration.ApplicationPool` object for an application pool.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>IisAppPool</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Use the `Microsoft.Web.Administration` API to get a .NET object for an application pool.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-IisAppPool</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisAppPool -Name 'Batcave'</dev:code> <dev:remarks> <maml:para>Gets the `Batcave` application pool.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisAppPool -Name 'Missing!'</dev:code> <dev:remarks> <maml:para>Returns `null` since, for purposes of this example, there is no `Missing~` application pool.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/microsoft.web.administration.applicationpool(v=vs.90).aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-IisConfigurationSection</command:name> <maml:description> <maml:para>Gets a Microsoft.Web.Adminisration configuration section for a given site and path.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>IisConfigurationSection</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses the Microsoft.Web.Administration API to get a `Microsoft.Web.Administration.ConfigurationSection`.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-IisConfigurationSection</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SectionPath</maml:name> <maml:description> <maml:para>The path to the configuration section to return.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Type</maml:name> <maml:description> <maml:para>The type of object to return. Optional.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Type</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-IisConfigurationSection</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional site path whose configuration should be returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SectionPath</maml:name> <maml:description> <maml:para>The path to the configuration section to return.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Type</maml:name> <maml:description> <maml:para>The type of object to return. Optional.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Type</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SectionPath</maml:name> <maml:description> <maml:para>The path to the configuration section to return.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Type</maml:name> <maml:description> <maml:para>The type of object to return. Optional.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Type</command:parameterValue> <dev:type> <maml:name>Type</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional site path whose configuration should be returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>Microsoft.Web.Administration.ConfigurationSection</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisConfigurationSection -SiteName Peanuts -Path Doghouse -Path 'system.webServer/security/authentication/anonymousAuthentication'</dev:code> <dev:remarks> <maml:para>Returns a configuration section which represents the Peanuts site's Doghouse path's anonymous authentication settings.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-IisHttpHeader</command:name> <maml:description> <maml:para>Gets the HTTP headers for a website or directory under a website.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>IisHttpHeader</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>For each custom HTTP header defined under a website and/or a sub-directory under a website, returns a `Carbon.Iis.HttpHeader` object. This object has two properties: * Name: the name of the HTTP header * Value: the value of the HTTP header</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-IisHttpHeader</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the website whose headers to return.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path under `SiteName` whose headers to return.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the HTTP header to return. Optional. If not given, all headers are returned. Wildcards supported.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the website whose headers to return.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path under `SiteName` whose headers to return.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the HTTP header to return. Optional. If not given, all headers are returned. Wildcards supported.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisHttpHeader -SiteName SopwithCamel</dev:code> <dev:remarks> <maml:para>Returns the HTTP headers for the `SopwithCamel` website.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisHttpHeader -SiteName SopwithCamel -Path Engine</dev:code> <dev:remarks> <maml:para>Returns the HTTP headers for the `Engine` directory under the `SopwithCamel` website.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisHttpHeader -SiteName SopwithCambel -Name 'X-*'</dev:code> <dev:remarks> <maml:para>Returns all HTTP headers which match the `X-*` wildcard.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Set-IisHttpHeader</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-IisHttpRedirect</command:name> <maml:description> <maml:para>Gets the HTTP redirect settings for a website or virtual directory/application under a website.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>IisHttpRedirect</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns a `Carbon.Iis.HttpRedirectConfigurationSection` object for the given HTTP redirect settings. The object contains the following properties: * Enabled - `True` if the redirect is enabled, `False` otherwise. * Destination - The URL where requests are directed to. * HttpResponseCode - The HTTP status code sent to the browser for the redirect. * ExactDestination - `True` if redirects are to destination, regardless of the request path. This will send all requests to `Destination`. * ChildOnly - `True` if redirects are only to content in the destination directory (not subdirectories).</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-IisHttpRedirect</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site's whose HTTP redirect settings will be retrieved.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path to a sub-directory under `SiteName` whose settings to return.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site's whose HTTP redirect settings will be retrieved.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path to a sub-directory under `SiteName` whose settings to return.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisHttpRedirect -SiteName ExampleWebsite</dev:code> <dev:remarks> <maml:para>Gets the redirect settings for ExampleWebsite.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisHttpRedirect -SiteName ExampleWebsite -Path MyVirtualDirectory</dev:code> <dev:remarks> <maml:para>Gets the redirect settings for the MyVirtualDirectory virtual directory under ExampleWebsite.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://www.iis.net/configreference/system.webserver/httpredirect</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-IisMimeMap</command:name> <maml:description> <maml:para>Gets the file extension to MIME type mappings.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>IisMimeMap</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>IIS won't serve static content unless there is an entry for it in the web server or website's MIME map configuration. This function will return all the MIME maps for the current server. The objects returned are instances of the `Carbon.Iis.MimeMap` class, and contain the following properties: * `FileExtension`: the mapping's file extension * `MimeType`: the mapping's MIME type</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-IisMimeMap</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FileExtension</maml:name> <maml:description> <maml:para>The name of the file extensions to return. Wildcards accepted.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MimeType</maml:name> <maml:description> <maml:para>The name of the MIME type(s) to return. Wildcards accepted.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-IisMimeMap</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The website whose MIME mappings to return. If not given, returns the web server's MIME map.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The directory under the website whose MIME mappings to return. Optional.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FileExtension</maml:name> <maml:description> <maml:para>The name of the file extensions to return. Wildcards accepted.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MimeType</maml:name> <maml:description> <maml:para>The name of the MIME type(s) to return. Wildcards accepted.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FileExtension</maml:name> <maml:description> <maml:para>The name of the file extensions to return. Wildcards accepted.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MimeType</maml:name> <maml:description> <maml:para>The name of the MIME type(s) to return. Wildcards accepted.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The website whose MIME mappings to return. If not given, returns the web server's MIME map.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The directory under the website whose MIME mappings to return. Optional.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>Carbon.Iis.MimeMap</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisMimeMap</dev:code> <dev:remarks> <maml:para>Gets all the the file extension to MIME type mappings for the web server.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisMimeMap -FileExtension .htm*</dev:code> <dev:remarks> <maml:para>Gets all the file extension to MIME type mappings whose file extension matches the `.htm*` wildcard.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisMimeMap -MimeType 'text/*'</dev:code> <dev:remarks> <maml:para>Gets all the file extension to MIME type mappings whose MIME type matches the `text/*` wildcard.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisMimeMap -SiteName DeathStar</dev:code> <dev:remarks> <maml:para>Gets all the file extenstion to MIME type mappings for the `DeathStar` website.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisMimeMap -SiteName DeathStar -VirtualPath ExhaustPort</dev:code> <dev:remarks> <maml:para>Gets all the file extension to MIME type mappings for the `DeathStar`'s `ExhausePort` directory.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Set-IisMimeMap</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-IisSecurityAuthentication</command:name> <maml:description> <maml:para>Gets a site's (and optional sub-directory's) security authentication configuration section.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>IisSecurityAuthentication</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>You can get the anonymous, basic, digest, and Windows authentication sections by using the `Anonymous`, `Basic`, `Digest`, or `Windows` switches, respectively.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-IisSecurityAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Anonymous</maml:name> <maml:description> <maml:para>Gets a site's (and optional sub-directory's) anonymous authentication configuration section.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-IisSecurityAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Basic</maml:name> <maml:description> <maml:para>Gets a site's (and optional sub-directory's) basic authentication configuration section.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-IisSecurityAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Digest</maml:name> <maml:description> <maml:para>Gets a site's (and optional sub-directory's) digest authentication configuration section.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-IisSecurityAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Windows</maml:name> <maml:description> <maml:para>Gets a site's (and optional sub-directory's) Windows authentication configuration section.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Anonymous</maml:name> <maml:description> <maml:para>Gets a site's (and optional sub-directory's) anonymous authentication configuration section.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Basic</maml:name> <maml:description> <maml:para>Gets a site's (and optional sub-directory's) basic authentication configuration section.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Digest</maml:name> <maml:description> <maml:para>Gets a site's (and optional sub-directory's) digest authentication configuration section.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Windows</maml:name> <maml:description> <maml:para>Gets a site's (and optional sub-directory's) Windows authentication configuration section.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisSecurityAuthentication -SiteName Peanuts -Anonymous</dev:code> <dev:remarks> <maml:para>Gets the `Peanuts` site's anonymous authentication configuration section.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisSecurityAuthentication -SiteName Peanuts -VirtualPath Doghouse -Basic</dev:code> <dev:remarks> <maml:para>Gets the `Peanuts` site's `Doghouse` sub-directory's basic authentication configuration section.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-IisVersion</command:name> <maml:description> <maml:para>Gets the version of IIS.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>IisVersion</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Reads the version of IIS from the registry, and returns it as a `Major.Minor` formatted string.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-IisVersion</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisVersion</dev:code> <dev:remarks> <maml:para>Returns `7.0` on Windows 2008, and `7.5` on Windows 7 and Windows 2008 R2.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-IisWebsite</command:name> <maml:description> <maml:para>Returns all the websites installed on the local computer, or a specific website.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>IisWebsite</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns a Microsoft.Web.Administration.Site object. Each object will have a `CommitChanges` script method added which will allow you to commit/persist any changes to the website's configuration.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-IisWebsite</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisWebsite</dev:code> <dev:remarks> <maml:para>Returns all installed websites.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IisWebsite -SiteName 'WebsiteName'</dev:code> <dev:remarks> <maml:para>Returns the details for the site named `WebsiteName`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/microsoft.web.administration.site.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-IPAddress</command:name> <maml:description> <maml:para>Gets the IP addresses in use on the local computer.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>IPAddress</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The .NET API for getting all the IP addresses in use on the current computer's network intefaces is pretty cumbersome. If all you care about is getting the IP addresses in use on the current computer, and you don't care where/how they're used, use this function. If you *do* care about network interfaces, then you'll have to do it yourself using the [System.Net.NetworkInformation.NetworkInterface](http://msdn.microsoft .com/en-us/library/System.Net.NetworkInformation.NetworkInterface.aspx) class's [GetAllNetworkInterfaces](http://msdn.microsoft.com/en-us/library/system.net.net workinformation.networkinterface.getallnetworkinterfaces.aspx) static method, e.g. [Net.NetworkInformation.NetworkInterface]::GetNetworkInterfaces()</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-IPAddress</maml:name> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-IPAddress</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>V4</maml:name> <maml:description> <maml:para>Return just IPv4 addresses.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>V6</maml:name> <maml:description> <maml:para>Return just IPv6 addresses.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>V4</maml:name> <maml:description> <maml:para>Return just IPv4 addresses.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>V6</maml:name> <maml:description> <maml:para>Return just IPv6 addresses.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IPAddress</dev:code> <dev:remarks> <maml:para>Returns all the IP addresses in use on the local computer, IPv4 *and* IPv6.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IPAddress -V4</dev:code> <dev:remarks> <maml:para>Returns just the IPv4 addresses in use on the local computer.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-IPADdress -V6</dev:code> <dev:remarks> <maml:para>Retruns just the IPv6 addresses in use on the local computer.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://stackoverflow.com/questions/1069103/how-to-get-my-own-ip-address-in-c</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-MsmqMessageQueue</command:name> <maml:description> <maml:para>Gets the MSMQ message queue by the given name</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>MsmqMessageQueue</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns a [MessageQueue](http://msdn.microsoft.com/en-us/library/system.messagin g.messagequeue.aspx) object for the Message Queue with name `Name`. If one doesn't exist, returns `$null`. Because MSMQ handles private queues differently than public queues, you must explicitly tell `Get-MsmqMessageQueue` the queue you want to get is private by using the `Private` switch.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-MsmqMessageQueue</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the queue to get.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Private</maml:name> <maml:description> <maml:para>Is the queue private?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the queue to get.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Private</maml:name> <maml:description> <maml:para>Is the queue private?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-MsmqMessageQueue -Name LunchQueue</dev:code> <dev:remarks> <maml:para>Returns the [MessageQueue](http://msdn.microsoft.com/en-us/library/system.messag ing.messagequeue.aspx) object for the queue named LunchQueue. It's probably pretty full!</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-MsmqMessageQueue -Name TeacherLunchQueue -Private</dev:code> <dev:remarks> <maml:para>Returns the [MessageQueue](http://msdn.microsoft.com/en-us/library/system.messag ing.messagequeue.aspx) object for the teacher's private LunchQueue. They must be medical professors.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-MsmqMessageQueuePath</command:name> <maml:description> <maml:para>Gets the path to an MSMQ message queue.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>MsmqMessageQueuePath</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The MSMQ APIs expect paths when identifying a queue. This function converts a queue name into its path so that logic isn't spread across all your scripts. Private queue paths are constructed differently. If you need to get the path to a private MSMQ, use the `Private` switch.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-MsmqMessageQueuePath</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The queue's name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Private</maml:name> <maml:description> <maml:para>Is the queue private?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The queue's name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Private</maml:name> <maml:description> <maml:para>Is the queue private?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-MsmqMessageQueuePath -Name MovieQueue</dev:code> <dev:remarks> <maml:para>Returns the path to the `MovieQueue` queue.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-MsmqMessageQueuePath -Name MovieQueue -Private</dev:code> <dev:remarks> <maml:para>Returns the path to the private `MovieQueue`. Must be for the critics. Early access for the win!</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-PathProvider</command:name> <maml:description> <maml:para>Returns a path's PowerShell provider.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>PathProvider</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>When you want to do something with a path that depends on its provider, use this function. The path doesn't have to exist. If you pass in a relative path, it is resolved relative to the current directory. So make sure you're in the right place.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-PathProvider</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-PathProvider -Path 'C:\Windows'</dev:code> <dev:remarks> <maml:para>Demonstrates how to get the path provider for an NTFS path.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-PathToHostsFile</command:name> <maml:description> <maml:para>Gets the path to this computer's hosts file.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>PathToHostsFile</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>This is a convenience method so you don't have to have the path to the hosts file hard-coded in your scripts.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-PathToHostsFile</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-PathToHostsFile</dev:code> <dev:remarks> <maml:para>Returns `C:\Windows\system32\drivers\etc\hosts`. Uses the environment variable to find the root to the Windows directory.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-PerformanceCounter</command:name> <maml:description> <maml:para>Gets the performance counters for a category.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>PerformanceCounter</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns `PerformanceCounterCategory` objects for the given category name. If not counters exist for the category exits, an empty array is returned.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-PerformanceCounter</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>CategoryName</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>CategoryName</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-PerformanceCounter -CategoryName Processor</dev:code> <dev:remarks> <maml:para>Gets all the `Processor` performance counters.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-Permission</command:name> <maml:description> <maml:para>Gets the permissions (access control rules) for a file, directory, registry key, or certificate's private key/key container.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>Permission</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Permissions for a specific identity can also be returned. Access control entries are for a path's discretionary access control list. To return inherited permissions, use the `Inherited` switch. Otherwise, only non-inherited (i.e. explicit) permissions are returned. Certificate permissions are only returned if a certificate has a private key/key container. If a certificate doesn't have a private key, `$null` is returned.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-Permission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path whose permissions (i.e. access control rules) to return. File system, registry, or certificate paths supported. Wildcards supported.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity whose permissiosn (i.e. access control rules) to return.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Inherited</maml:name> <maml:description> <maml:para>Return inherited permissions in addition to explicit permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path whose permissions (i.e. access control rules) to return. File system, registry, or certificate paths supported. Wildcards supported.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity whose permissiosn (i.e. access control rules) to return.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Inherited</maml:name> <maml:description> <maml:para>Return inherited permissions in addition to explicit permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.Security.AccessControl.AccessRule</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-Permission -Path 'C:\Windows'</dev:code> <dev:remarks> <maml:para>Returns `System.Security.AccessControl.FileSystemAccessRule` objects for all the non-inherited rules on `C:\windows`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-Permission -Path 'hklm:\Software' -Inherited</dev:code> <dev:remarks> <maml:para>Returns `System.Security.AccessControl.RegistryAccessRule` objects for all the inherited and non-inherited rules on `hklm:\software`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-Permission -Path 'C:\Windows' -Idenity Administrators</dev:code> <dev:remarks> <maml:para>Returns `System.Security.AccessControl.FileSystemAccessRule` objects for all the `Administrators'` rules on `C:\windows`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-Permission -Path 'Cert:\LocalMachine\1234567890ABCDEF1234567890ABCDEF12345678'</dev:code> <dev:remarks> <maml:para>Returns `System.Security.AccessControl.CryptoKeyAccesRule` objects for certificate's `Cert:\LocalMachine\1234567890ABCDEF1234567890ABCDEF12345678` private key/key container. If it doesn't have a private key, `$null` is returned.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Carbon_Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Protect-Acl</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Revoke-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-PowerShellModuleInstallPath</command:name> <maml:description> <maml:para>Returns the path to the directory where you can install custom modules.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>PowerShellModuleInstallPath</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Custom modules should be installed under the `Program Files` directory. This function looks at the `PSModulePath` environment variable to find the install location under `Program Files`. If that path doesn't exist or isn't part of the `PSModulePath` environment variable, returns the module path under `$PSHOME`. If that path doesn't exist or isn't part of the `PSModulePath` environment variable, an error is written and nothing is returned.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-PowerShellModuleInstallPath</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-PowerShellModuleInstallPath</dev:code> <dev:remarks> <maml:para>Demonstrates how to get the path where modules should be installed.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-PowershellPath</command:name> <maml:description> <maml:para>Gets the path to powershell.exe.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>PowershellPath</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns the path to the powershell.exe binary for the machine's default architecture (i.e. x86 or x64). If you're on a x64 machine and want to get the path to x86 PowerShell, set the `x86` switch. Here are the possible combinations of operating system, PowerShell, and desired path architectures, and the path they map to. +-----+-----+------+-------------------------------------------------------- ------+ | OS | PS | Path | Result | +-----+-----+------+-------------------------------------------------------- ------+ | x64 | x64 | x64 | $env:windir\System32\Windows PowerShell\v1.0\powershell.exe | | x64 | x64 | x86 | $env:windir\SysWOW64\Windows PowerShell\v1.0\powershell.exe | | x64 | x86 | x64 | $env:windir\sysnative\Windows PowerShell\v1.0\powershell.exe | | x64 | x86 | x86 | $env:windir\SysWOW64\Windows PowerShell\v1.0\powershell.exe | | x86 | x86 | x64 | $env:windir\System32\Windows PowerShell\v1.0\powershell.exe | | x86 | x86 | x86 | $env:windir\System32\Windows PowerShell\v1.0\powershell.exe | +-----+-----+------+-------------------------------------------------------- ------+</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-PowershellPath</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>x86</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>x86</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-PowerShellPath</dev:code> <dev:remarks> <maml:para>Returns the path to the version of PowerShell that matches the computer's architecture (i.e. x86 or x64).</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-PowerShellPath -x86</dev:code> <dev:remarks> <maml:para>Returns the path to the x86 version of PowerShell.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-Privilege</command:name> <maml:description> <maml:para>Gets an identity's privileges.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>Privilege</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>These privileges are usually managed by Group Policy and control the system operations and types of logons a user/group can perform. Note: if a computer is not on a domain, this function won't work.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-Privilege</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-Privilege -Identity TheBeast</dev:code> <dev:remarks> <maml:para>Gets `TheBeast`'s privileges as an array of strings.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Carbon_Privilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-Privilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Revoke-Prvileges</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-Privilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-ProgramInstallInfo</command:name> <maml:description> <maml:para>Gets information about the programs installed on the computer.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>ProgramInstallInfo</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>This function is the PowerShell equivalent of the Programs and Features UI.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-ProgramInstallInfo</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>Carbon.Computer.ProgramInstallInfo</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ProgramInstallInfo</dev:code> <dev:remarks> <maml:para>Demonstrates how to get a list of all the installed programs, similar to what the Programs and Features UI shows.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ProgramInstallInfo -Name 'Google Chrome'</dev:code> <dev:remarks> <maml:para>Demonstrates how to get a specific program. If the specific program isn't found, `$null` is returned.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ProgramInstallInfo -Name 'Microsoft*'</dev:code> <dev:remarks> <maml:para>Demonstrates how to use wildcards to search for multiple programs.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-RegistryKeyValue</command:name> <maml:description> <maml:para>Gets the value from a registry key.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>RegistryKeyValue</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>PowerShell's `Get-ItemProperty` cmdlet is a pain to use. It doesn't actually return an object representing a registry key's value, but some other weird object that requires painful gyrations to get values from. This function returns just the value of a key.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-RegistryKeyValue</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the registry key where the value should be set. Will be created if it doesn't exist.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the value being set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the registry key where the value should be set. Will be created if it doesn't exist.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the value being set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-RegistryKeyValue -Path 'hklm:\Software\Carbon\Test' -Name 'Title'</dev:code> <dev:remarks> <maml:para>Returns the value of the 'hklm:\Software\Carbon\Test' key's `Title` value.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-ScheduledTask</command:name> <maml:description> <maml:para>Gets the scheduled tasks for the current computer.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>ScheduledTask</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The `Get-ScheduledTask` function gets the scheduled tasks on the current computer. It returns `Carbon.TaskScheduler.TaskInfo` objects for each one. With no parameters, `Get-ScheduledTask` returns all scheduled tasks. To get a specific scheduled task, use the `Name` parameter, which must be the full name of the task, i.e. path plus name. The name parameter accepts wildcards. If a scheduled task with the given name isn't found, an error is written. This function has the same name as the built-in `Get-ScheduledTask` function that comes on Windows 2012/8 and later. It returns objects with the same properties, but if you want to use the built-in function, use the `ScheduledTasks` qualifier, e.g. `ScheduledTasks\Get-ScheduledTask`.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-ScheduledTask</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>Carbon.TaskScheduler.TaskInfo</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ScheduledTask</dev:code> <dev:remarks> <maml:para>Demonstrates how to get all scheduled tasks.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ScheduledTask -Name 'AutoUpdateMyApp'</dev:code> <dev:remarks> <maml:para>Demonstrates how to get a specific task.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ScheduledTask -Name '*Microsoft*'</dev:code> <dev:remarks> <maml:para>Demonstrates how to get all tasks that match a wildcard pattern.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>ScheduledTasks\Get-ScheduledTask</dev:code> <dev:remarks> <maml:para>Demonstrates how to call the `Get-ScheduledTask` function in the `ScheduledTasks` module which ships on Windows 2012/8 and later.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Test-ScheduledTask</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-ServiceAcl</command:name> <maml:description> <maml:para>Gets the discretionary access control list (i.e. DACL) for a service.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>ServiceAcl</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>You wanted it, you got it! You probably want to use `Get-ServicePermission` instead. If you want to chagne a service's permissions, use `Grant-ServicePermission` or `Revoke-ServicePermissions`.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-ServiceAcl</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ServiceAcl -Name Hyperdrive</dev:code> <dev:remarks> <maml:para>Gets the `Hyperdrive` service's DACL.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-ServicePermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-ServicePermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Revoke-ServicePermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-ServiceConfiguration</command:name> <maml:description> <maml:para>Gets a service's full configuration, e.g. username, path, failure actions, etc.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>ServiceConfiguration</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The .NET `ServiceController` object only returns basic information about a service. This function returns a bunch of the missing configuration in the form of a `Carbon.Service.ServiceInfo` object: * Account name/user name * Path * Description * Failure actions You can load a specific service using its name, or pipe in `ServiceController` objects. In addition to this function, Carbon also adds this information as extended type data properties onto the `ServiceController` class. To see it, Get-Service | Get-Member This function is new in Carbon 1.8.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-ServiceConfiguration</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName)" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName)" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <!-- Inputs--> <command:inputType> <dev:type> <maml:name>System.String</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>Carbon.Service.ServiceInfo</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-Service | Get-ServiceConfiguration</dev:code> <dev:remarks> <maml:para>Demonstrates how you can pipe in a `ServiceController` object to load the service.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ServiceConfiguration -Name 'w3svc'</dev:code> <dev:remarks> <maml:para>Demonstrates how you can get a specific service's configuration.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-ServicePermission</command:name> <maml:description> <maml:para>Gets the permissions for a service.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>ServicePermission</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses the Win32 advapi32 API to query the permissions for a service. Returns `Carbon.ServiceAccessRule` objects for each. The two relavant properties on this object are * IdentityReference - The identity of the permission. * ServiceAccessRights - The permissions the user has.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-ServicePermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the service whose permissions to return.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The specific identity whose permissions to get.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the service whose permissions to return.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The specific identity whose permissions to get.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ServicePermission -Name 'Hyperdrive'</dev:code> <dev:remarks> <maml:para>Gets the access rules for the `Hyperdrive` service.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ServicePermission -Name 'Hyperdrive' -Identity FALCON\HSolo</dev:code> <dev:remarks> <maml:para>Gets just Han's permissions to control the `Hyperdrive` service.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Grant-ServicePermissions</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Revoke-ServicePermissions</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-ServiceSecurityDescriptor</command:name> <maml:description> <maml:para>Gets the raw security descriptor for a service.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>ServiceSecurityDescriptor</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>You probably don't want to mess with the raw security descriptor. Try `Get-ServicePermission` instead. Much more useful.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-ServiceSecurityDescriptor</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ServiceSecurityDescriptor -Name 'Hyperdrive'</dev:code> <dev:remarks> <maml:para>Gets the hyperdrive service's raw security descriptor.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-ServicePermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-ServicePermissions</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Revoke-ServicePermissions</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-SslCertificateBinding</command:name> <maml:description> <maml:para>Gets the SSL certificate bindings on this computer.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>SslCertificateBinding</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Windows binds SSL certificates to an IP addresses/port combination. This function gets all the SSL bindings on this computer, or a binding for a specific IP/port, or $null if one doesn't exist. The bindings are returned as `Carbon.Certificates.SslCertificateBinding` objects.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-SslCertificateBinding</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>IPAddress</maml:name> <maml:description> <maml:para>The IP address whose certificate(s) to get. Should be in the form IP:port. Optional.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">IPAddress</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Port</maml:name> <maml:description> <maml:para>The port whose certificate(s) to get. Optional.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">UInt16</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>IPAddress</maml:name> <maml:description> <maml:para>The IP address whose certificate(s) to get. Should be in the form IP:port. Optional.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">IPAddress</command:parameterValue> <dev:type> <maml:name>IPAddress</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Port</maml:name> <maml:description> <maml:para>The port whose certificate(s) to get. Optional.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">UInt16</command:parameterValue> <dev:type> <maml:name>UInt16</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>></maml:para> </maml:introduction> <dev:code>Get-SslCertificateBinding</dev:code> <dev:remarks> <maml:para>Gets all the SSL certificate bindings on the local computer.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>></maml:para> </maml:introduction> <dev:code>Get-SslCertificateBinding -IPAddress 42.37.80.47 -Port 443</dev:code> <dev:remarks> <maml:para>Gets the SSL certificate bound to 42.37.80.47, port 443.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>></maml:para> </maml:introduction> <dev:code>Get-SslCertificateBinding -Port 443</dev:code> <dev:remarks> <maml:para>Gets the default SSL certificate bound to ALL the computer's IP addresses on port 443.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-TrustedHost</command:name> <maml:description> <maml:para>Returns the current computer's trusted hosts list.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>TrustedHost</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>PowerShell stores its trusted hosts list as a comma-separated list of hostnames in the `WSMan` drive. That's not very useful. This function reads that list, splits it, and returns each item.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-TrustedHost</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-TrustedHost</dev:code> <dev:remarks> <maml:para>If the trusted hosts lists contains `example.com`, `api.example.com`, and `docs.example.com`, returns the following: example.com api.example.com docs.example.com</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-User</command:name> <maml:description> <maml:para>Gets *local* users.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>User</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Gets all *local* users or a specific user by its username.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-User</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Username</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Username</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.DirectoryServices.AccountManagement.UserPrincipal</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-User</dev:code> <dev:remarks> <maml:para>Demonstrates how to get all local users.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-User -Username LSkywalker</dev:code> <dev:remarks> <maml:para>Demonstrates how to get a specific user.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Install-User</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-User</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Uninstall-User</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-WindowsFeature</command:name> <maml:description> <maml:para>Gets a list of available Windows features, or details on a specific windows feature.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>WindowsFeature</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Different versions of Windows use different names for installing Windows features. Use this function to get the list of functions for your operating system. With no arguments, will return a list of all Windows features. You can use the `Name` parameter to return a specific feature or a list of features that match a wildcard. **This function is not available on Windows 8/2012.**</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-WindowsFeature</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-WindowsFeature</dev:code> <dev:remarks> <maml:para>Returns a list of all available Windows features.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-WindowsFeature -Name MSMQ</dev:code> <dev:remarks> <maml:para>Returns the MSMQ feature.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-WindowsFeature -Name *msmq*</dev:code> <dev:remarks> <maml:para>Returns any Windows feature whose name matches the wildcard `*msmq*`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Install-WindowsFeature</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-WindowsFeature</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Uninstall-WindowsFeature</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Get-WmiLocalUserAccount</command:name> <maml:description> <maml:para>Gets a WMI `Win32_UserAccount` object for a *local* user account.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Get</command:verb> <command:noun>WmiLocalUserAccount</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Man, there are so many ways to get a user account in Windows. This function uses WMI to get a local user account. It returns a `Win32_UserAccount` object. The username has to be less than 20 characters. We don't remember why anymore, but it's probaly a restriction of WMI. Or Windows. Or both. You can do this with `Get-WmiObject`, but when you try to get a `Win32_UserAccount`, PowerShell reaches out to your domain and gets all the users it finds, even if you filter by name. This is slow! This function stops WMI from talking to your domain, so it is faster.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Get-WmiLocalUserAccount</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Username</maml:name> <maml:description> <maml:para>The username of the local user to get.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Username</maml:name> <maml:description> <maml:para>The username of the local user to get.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-WmiLocalUserAccount -Username Administrator</dev:code> <dev:remarks> <maml:para>Gets the local Administrator account as a `Win32_UserAccount` WMI object.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/windows/desktop/aa394507(v=vs.85).aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Grant-ComPermission</command:name> <maml:description> <maml:para>Grants COM access permissions.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Grant</command:verb> <command:noun>ComPermission</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Calling this function is equivalent to opening Component Services (dcomcnfg), right-clicking `My Computer` under Component Services > Computers, choosing `Properties`, going to the `COM Security` tab, and modifying the permission after clicking the `Edit Limits...` or `Edit Default...` buttons under the `Access Permissions` section. You must set at least one of the `LocalAccess` or `RemoteAccess` switches.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Grant-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Access</maml:name> <maml:description> <maml:para>Grants Access Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Limits</maml:name> <maml:description> <maml:para>Grants security limits permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Deny</maml:name> <maml:description> <maml:para>If set, denies the given permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Local</maml:name> <maml:description> <maml:para>If set, grants local access permissions. Only valid if `Access` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Remote</maml:name> <maml:description> <maml:para>If set, grants remote access permissions. Only valid if `Access` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Grant-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Access</maml:name> <maml:description> <maml:para>Grants Access Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Default</maml:name> <maml:description> <maml:para>Grants default security permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Deny</maml:name> <maml:description> <maml:para>If set, denies the given permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Local</maml:name> <maml:description> <maml:para>If set, grants local access permissions. Only valid if `Access` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Remote</maml:name> <maml:description> <maml:para>If set, grants remote access permissions. Only valid if `Access` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Grant-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Access</maml:name> <maml:description> <maml:para>Grants Access Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Limits</maml:name> <maml:description> <maml:para>Grants security limits permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Allow</maml:name> <maml:description> <maml:para>If set, allows the given permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Local</maml:name> <maml:description> <maml:para>If set, grants local access permissions. Only valid if `Access` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Remote</maml:name> <maml:description> <maml:para>If set, grants remote access permissions. Only valid if `Access` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Grant-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Access</maml:name> <maml:description> <maml:para>Grants Access Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Default</maml:name> <maml:description> <maml:para>Grants default security permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Allow</maml:name> <maml:description> <maml:para>If set, allows the given permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Local</maml:name> <maml:description> <maml:para>If set, grants local access permissions. Only valid if `Access` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Remote</maml:name> <maml:description> <maml:para>If set, grants remote access permissions. Only valid if `Access` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Grant-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LaunchAndActivation</maml:name> <maml:description> <maml:para>Grants Launch and Activation Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Limits</maml:name> <maml:description> <maml:para>Grants security limits permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Deny</maml:name> <maml:description> <maml:para>If set, denies the given permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LocalLaunch</maml:name> <maml:description> <maml:para>If set, grants local launch permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RemoteLaunch</maml:name> <maml:description> <maml:para>If set, grants remote launch permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LocalActivation</maml:name> <maml:description> <maml:para>If set, grants local activation permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RemoteActivation</maml:name> <maml:description> <maml:para>If set, grants remote activation permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Grant-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LaunchAndActivation</maml:name> <maml:description> <maml:para>Grants Launch and Activation Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Default</maml:name> <maml:description> <maml:para>Grants default security permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Deny</maml:name> <maml:description> <maml:para>If set, denies the given permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LocalLaunch</maml:name> <maml:description> <maml:para>If set, grants local launch permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RemoteLaunch</maml:name> <maml:description> <maml:para>If set, grants remote launch permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LocalActivation</maml:name> <maml:description> <maml:para>If set, grants local activation permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RemoteActivation</maml:name> <maml:description> <maml:para>If set, grants remote activation permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Grant-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LaunchAndActivation</maml:name> <maml:description> <maml:para>Grants Launch and Activation Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Limits</maml:name> <maml:description> <maml:para>Grants security limits permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Allow</maml:name> <maml:description> <maml:para>If set, allows the given permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LocalLaunch</maml:name> <maml:description> <maml:para>If set, grants local launch permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RemoteLaunch</maml:name> <maml:description> <maml:para>If set, grants remote launch permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LocalActivation</maml:name> <maml:description> <maml:para>If set, grants local activation permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RemoteActivation</maml:name> <maml:description> <maml:para>If set, grants remote activation permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Grant-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LaunchAndActivation</maml:name> <maml:description> <maml:para>Grants Launch and Activation Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Default</maml:name> <maml:description> <maml:para>Grants default security permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Allow</maml:name> <maml:description> <maml:para>If set, allows the given permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LocalLaunch</maml:name> <maml:description> <maml:para>If set, grants local launch permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RemoteLaunch</maml:name> <maml:description> <maml:para>If set, grants remote launch permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LocalActivation</maml:name> <maml:description> <maml:para>If set, grants local activation permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RemoteActivation</maml:name> <maml:description> <maml:para>If set, grants remote activation permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Access</maml:name> <maml:description> <maml:para>Grants Access Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Limits</maml:name> <maml:description> <maml:para>Grants security limits permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Deny</maml:name> <maml:description> <maml:para>If set, denies the given permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Local</maml:name> <maml:description> <maml:para>If set, grants local access permissions. Only valid if `Access` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Remote</maml:name> <maml:description> <maml:para>If set, grants remote access permissions. Only valid if `Access` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Default</maml:name> <maml:description> <maml:para>Grants default security permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Allow</maml:name> <maml:description> <maml:para>If set, allows the given permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LaunchAndActivation</maml:name> <maml:description> <maml:para>Grants Launch and Activation Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LocalLaunch</maml:name> <maml:description> <maml:para>If set, grants local launch permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RemoteLaunch</maml:name> <maml:description> <maml:para>If set, grants remote launch permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LocalActivation</maml:name> <maml:description> <maml:para>If set, grants local activation permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RemoteActivation</maml:name> <maml:description> <maml:para>If set, grants remote activation permissions. Only valid if `LaunchAndActivation` switch is set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Grant-ComPermission -Access -Identity 'Users' -Allow -Default -Local</dev:code> <dev:remarks> <maml:para>Updates access permission default security to allow the local `Users` group local access permissions.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Grant-ComPermission -LaunchAndActivation -Identity 'Users' -Limits -Deny -Local -Remote</dev:code> <dev:remarks> <maml:para>Updates access permission security limits to deny the local `Users` group local and remote access permissions.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-ComPermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Revoke-ComPermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Grant-MsmqMessageQueuePermission</command:name> <maml:description> <maml:para>Grants a user permissions on an MSMQ message queue.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Grant</command:verb> <command:noun>MsmqMessageQueuePermission</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>If you want users to be able to access your queue, you need to grant them access. This function will do that. The rights you can assign are specified using values from the [MessageQueueAccessRights enumeration](http://msdn.microsoft.com/en-us/library/s ystem.messaging.messagequeueaccessrights.aspx). If your queue is private, make sure you set the `Private` switch.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Grant-MsmqMessageQueuePermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The queue name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Private</maml:name> <maml:description> <maml:para>Is the queue private?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Username</maml:name> <maml:description> <maml:para>The user to grant permissions to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>AccessRights</maml:name> <maml:description> <maml:para>The rights to grant the user.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MessageQueueAccessRights[]</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The queue name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Private</maml:name> <maml:description> <maml:para>Is the queue private?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Username</maml:name> <maml:description> <maml:para>The user to grant permissions to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>AccessRights</maml:name> <maml:description> <maml:para>The rights to grant the user.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MessageQueueAccessRights[]</command:parameterValue> <dev:type> <maml:name>MessageQueueAccessRights[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Grant-MsmqMessageQueuePermission -Name MovieQueue -Username REGAL\Employees -AccessRights FullControl</dev:code> <dev:remarks> <maml:para>Grants Regal Cinema employees full control over the MovieQueue.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Grant-MsmqMessageQueuePermission -Name MovieQueue -Private -Username REGAL\Critics -AccessRights WriteMessage</dev:code> <dev:remarks> <maml:para>Grants all of Regal's approved movie critics permission to write to the private critic's `MovieQueue`. Lucky!</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.messaging.messagequeueaccessrights.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Grant-Permission</command:name> <maml:description> <maml:para>Grants permission on a file, directory, registry key, or certificate's private key/key container.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Grant</command:verb> <command:noun>Permission</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Granting access to a file system entry, registry key, or certificate's private key/key container requires a lot of steps. This method reduces it to one call. Very helpful. Beginning with Carbon 2.0, permissions are only granted if they don't exist on an item, which saves a lot of time when granting permissions on large directory trees. If you always want to grant permissions, use the `Force` switch. Beginning with Carbon 2.0, this function returns any new/updated access rules set on `Path`. It has the advantage that it will set permissions on a file system object, a registry key, or a certificate's private key/key container. If `Path` is absolute, the correct provider (file system or registry) is used. If `Path` is relative, the provider of the current location will be used. The `Permissions` attribute can be a list of [FileSystemRights](http://msdn.micr osoft.com/en-us/library/system.security.accesscontrol.filesystemrights.aspx), [R egistryRights](http://msdn.microsoft.com/en-us/library/system.security.accesscon trol.registryrights.aspx), or [CryptoKeyRights](http://msdn.microsoft.com/en-us/ library/system.security.accesscontrol.cryptokeyrights.aspx). These commands will show you the values for the appropriate permissions for your object: [Enum]::GetValues([Security.AccessControl.FileSystemRights]) [Enum]::GetValues([Security.AccessControl.RegistryRights]) [Enum]::GetValues([Security.AccessControl.CryptoKeyRights]) ## Directories and Registry Keys When setting permissions on a container (directory/registry key) you can control inheritance and propagation flags using the `ApplyTo` parameter. There are 13 possible combinations. Examples work best. Here is a simple hierarchy: C / \ CC CL / \ GC GL C is the **C**ontainer permissions are getting set on CC is a **C**hild **C**ontainer CL is a **C**hild **L**eaf GC is a **G**randchild **C**ontainer and includes all sub-containers below it GL is a **G**randchild **L**eaf The `ApplyTo` parameter takes one of the following 13 values and applies permissions to: * **Container** - The container itself and nothing below it. * **SubContainers** - All sub-containers under the container, e.g. CC and GC. * **Leaves** - All leaves under the container, e.g. CL and GL. * **ChildContainers** - Just the container's child containers, e.g. CC. * **ChildLeaves** - Just the container's child leaves, e.g. CL. * **ContainerAndSubContainers** - The container and all its sub-containers, e.g. C, CC, and GC. * **ContainerAndLeaves** - The container and all leaves under it, e.g. C and CL. * **SubContainerAndLeaves** - All sub-containers and leaves, but not the container itself, e.g. CC, CL, GC, and GL. * **ContainerAndChildContainers** - The container and all just its child containers, e.g. C and CC. * **ContainerAndChildLeaves** - The container and just its child leaves, e.g. C and CL. * **ContainerAndChildContainersAndChildLeaves** - The container and just its child containers/leaves, e.g. C, CC, and CL. * **ContainerAndSubContainersAndLeaves** - Everything, full inheritance/propogation, e.g. C, CC, GC, GL. **This is the default.** * **ChildContainersAndChildLeaves** - Just the container's child containers/leaves, e.g. CC and CL. The following table maps `ContainerInheritanceFlags` values to the actual `InheritanceFlags` and `PropagationFlags` values used: ContainerInheritanceFlags InheritanceFlags PropagationFlags ------------------------- ---------------- ---------------- Container None None SubContainers ContainerInherit InheritOnly Leaves ObjectInherit InheritOnly ChildContainers ContainerInherit InheritOnly, NoPropagateInherit ChildLeaves ObjectInherit InheritOnly ContainerAndSubContainers ContainerInherit None ContainerAndLeaves ObjectInherit None SubContainerAndLeaves ContainerInherit,ObjectInherit InheritOnly ContainerAndChildContainers ContainerInherit None ContainerAndChildLeaves ObjectInherit None ContainerAndChildContainersAndChildLeaves ContainerInherit,ObjectInherit NoPropagateInherit ContainerAndSubContainersAndLeaves ContainerInherit,ObjectInherit None ChildContainersAndChildLeaves ContainerInherit,ObjectInherit InheritOnly The above information adpated from [Manage Access to Windows Objects with ACLs and the .NET Framework](http://msdn.microsoft.com/en-us/magazine/cc163885.aspx#S3), published in the November 2004 copy of *MSDN Magazine*. If you prefer to speak in `InheritanceFlags` or `PropagationFlags`, you can use the `ConvertTo-ContainerInheritaceFlags` function to convert your flags into Carbon's flags. ## Certificate Private Keys/Key Containers When setting permissions on a certificate's private key/key container, if a certificate doesn't have a private key, it is ignored and no permissions are set. Since certificate's are always leaves, the `ApplyTo` parameter is ignored. When using the `-Clear` switch, note that the local `Administrators` account will always remain. In testing on Windows 2012 R2, we noticed that when `Administrators` access was removed, you couldn't read the key anymore.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Grant-Permission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path on which the permissions should be granted. Can be a file system, registry, or certificate path.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The user or group getting the permissions.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Permission</maml:name> <maml:description> <maml:para>The permission: e.g. FullControl, Read, etc. For file system items, use values from [System.Security.AccessControl.FileSystemRights](http://msdn.microsoft.com/ en-us/library/system.security.accesscontrol.filesystemrights.aspx). For registry items, use values from [System.Security.AccessControl.RegistryRights](h ttp://msdn.microsoft.com/en-us/library/system.security.accesscontrol.registryrig hts.aspx).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>ApplyTo</maml:name> <maml:description> <maml:para>How to apply container permissions. This controls the inheritance and propagation flags. Default is full inheritance, e.g. `ContainersAndSubContainersAndLeaves`. This parameter is ignored if `Path` is to a leaf item.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">ContainerInheritanceFlags</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Clear</maml:name> <maml:description> <maml:para>Removes all non-inherited permissions on the item.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Grants permissions, even if they are already present.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path on which the permissions should be granted. Can be a file system, registry, or certificate path.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The user or group getting the permissions.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Permission</maml:name> <maml:description> <maml:para>The permission: e.g. FullControl, Read, etc. For file system items, use values from [System.Security.AccessControl.FileSystemRights](http://msdn.microsoft.com/ en-us/library/system.security.accesscontrol.filesystemrights.aspx). For registry items, use values from [System.Security.AccessControl.RegistryRights](h ttp://msdn.microsoft.com/en-us/library/system.security.accesscontrol.registryrig hts.aspx).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>ApplyTo</maml:name> <maml:description> <maml:para>How to apply container permissions. This controls the inheritance and propagation flags. Default is full inheritance, e.g. `ContainersAndSubContainersAndLeaves`. This parameter is ignored if `Path` is to a leaf item.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">ContainerInheritanceFlags</command:parameterValue> <dev:type> <maml:name>ContainerInheritanceFlags</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Clear</maml:name> <maml:description> <maml:para>Removes all non-inherited permissions on the item.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Grants permissions, even if they are already present.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.Security.AccessControl.AccessRule</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Grant-Permission -Identity ENTERPRISE\Engineers -Permission FullControl -Path C:\EngineRoom</dev:code> <dev:remarks> <maml:para>Grants the Enterprise's engineering group full control on the engine room. Very important if you want to get anywhere.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Grant-Permission -Identity ENTERPRISE\Interns -Permission ReadKey,QueryValues,EnumerateSubKeys -Path rklm:\system\WarpDrive</dev:code> <dev:remarks> <maml:para>Grants the Enterprise's interns access to read about the warp drive. They need to learn someday, but at least they can't change anything.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Grant-Permission -Identity ENTERPRISE\Engineers -Permission FullControl -Path C:\EngineRoom -Clear</dev:code> <dev:remarks> <maml:para>Grants the Enterprise's engineering group full control on the engine room. Any non-inherited, existing access rules are removed from `C:\EngineRoom`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Grant-Permission -Identity ENTERPRISE\Engineers -Permission FullControl -Path 'cert:\LocalMachine\My\1234567890ABCDEF1234567890ABCDEF12345678'</dev:code> <dev:remarks> <maml:para>Grants the Enterprise's engineering group full control on the `1234567890ABCDEF1234567890ABCDEF12345678` certificate's private key/key container.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Carbon_Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>ConvertTo-ContainerInheritanceFlags</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Protect-Acl</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Revoke-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.filesystemrights.aspx</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.registryrights.aspx</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.cryptokeyrights.aspx</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/magazine/cc163885.aspx#S3</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Grant-Privilege</command:name> <maml:description> <maml:para>Grants an identity priveleges to perform system operations.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Grant</command:verb> <command:noun>Privilege</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>*Privilege names are **case-sensitive**.* Valid privileges are documented on Microsoft's website: [Privilege Constants](http://msdn.microsoft.com/en-us/libra ry/windows/desktop/bb530716.aspx) and [Account Right Constants](http://msdn.micr osoft.com/en-us/library/windows/desktop/bb545671.aspx). Here is the most current list, as of August 2014: * SeAssignPrimaryTokenPrivilege * SeAuditPrivilege * SeBackupPrivilege * SeBatchLogonRight * SeChangeNotifyPrivilege * SeCreateGlobalPrivilege * SeCreatePagefilePrivilege * SeCreatePermanentPrivilege * SeCreateSymbolicLinkPrivilege * SeCreateTokenPrivilege * SeDebugPrivilege * SeDenyBatchLogonRight * SeDenyInteractiveLogonRight * SeDenyNetworkLogonRight * SeDenyRemoteInteractiveLogonRight * SeDenyServiceLogonRight * SeEnableDelegationPrivilege * SeImpersonatePrivilege * SeIncreaseBasePriorityPrivilege * SeIncreaseQuotaPrivilege * SeIncreaseWorkingSetPrivilege * SeInteractiveLogonRight * SeLoadDriverPrivilege * SeLockMemoryPrivilege * SeMachineAccountPrivilege * SeManageVolumePrivilege * SeNetworkLogonRight * SeProfileSingleProcessPrivilege * SeRelabelPrivilege * SeRemoteInteractiveLogonRight * SeRemoteShutdownPrivilege * SeRestorePrivilege * SeSecurityPrivilege * SeServiceLogonRight * SeShutdownPrivilege * SeSyncAgentPrivilege * SeSystemEnvironmentPrivilege * SeSystemProfilePrivilege * SeSystemtimePrivilege * SeTakeOwnershipPrivilege * SeTcbPrivilege * SeTimeZonePrivilege * SeTrustedCredManAccessPrivilege * SeUndockPrivilege * SeUnsolicitedInputPrivilege</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Grant-Privilege</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity to grant a privilege.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Privilege</maml:name> <maml:description> <maml:para>The privileges to grant. *Privilege names are **case-sensitive**.*</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity to grant a privilege.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Privilege</maml:name> <maml:description> <maml:para>The privileges to grant. *Privilege names are **case-sensitive**.*</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Grant-Privilege -Identity Batcomputer -Privilege SeServiceLogonRight</dev:code> <dev:remarks> <maml:para>Grants the Batcomputer account the ability to logon as a service. *Privilege names are **case-sensitive**.*</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-Privilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Revoke-Privilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-Privilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/windows/desktop/bb530716.aspx</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/windows/desktop/bb545671.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Grant-ServiceControlPermission</command:name> <maml:description> <maml:para>Grants a user/group permission to start/stop (i.e. use PowerShell's `*-Service` cmdlets) a service.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Grant</command:verb> <command:noun>ServiceControlPermission</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>By default, only Administrators are allowed to control a service. You may notice that when running the `Stop-Service`, `Start-Service`, or `Restart-Service` cmdlets as a non-Administrator, you get permissions errors. That's because you need to correct permissions. This function grants just the permissions needed to use PowerShell's `Stop-Service`, `Start-Service`, and `Restart-Service` cmdlets to control a service.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Grant-ServiceControlPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>ServiceName</maml:name> <maml:description> <maml:para>The name of the service.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The user/group name being given access.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>ServiceName</maml:name> <maml:description> <maml:para>The name of the service.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The user/group name being given access.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Grant-ServiceControlPermission -ServiceName CCService -Identity INITRODE\Builders</dev:code> <dev:remarks> <maml:para>Grants the INITRODE\Builders group permission to control the CruiseControl.NET service.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-ServicePermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-ServicePermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Revoke-ServicePermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Grant-ServicePermission</command:name> <maml:description> <maml:para>Grants permissions for an identity against a service.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Grant</command:verb> <command:noun>ServicePermission</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>By default, only Administators are allowed to manage a service. Use this function to grant specific identities permissions to manage a specific service. If you just want to grant a user the ability to start/stop/restart a service using PowerShell's `Start-Service`, `Stop-Service`, or `Restart-Service` cmdlets, use the `Grant-ServiceControlPermissions` function instead. Any previous permissions are replaced.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Grant-ServicePermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the service to grant permissions to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity to grant permissions for.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FullControl</maml:name> <maml:description> <maml:para>Grant full control on the service</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Grant-ServicePermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the service to grant permissions to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity to grant permissions for.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryConfig</maml:name> <maml:description> <maml:para>Grants permission to query the service's configuration.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ChangeConfig</maml:name> <maml:description> <maml:para>Grants permission to change the service's permission.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryStatus</maml:name> <maml:description> <maml:para>Grants permission to query the service's status.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EnumerateDependents</maml:name> <maml:description> <maml:para>Grants permissionto enumerate the service's dependent services.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Start</maml:name> <maml:description> <maml:para>Grants permission to start the service.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Stop</maml:name> <maml:description> <maml:para>Grants permission to stop the service.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PauseContinue</maml:name> <maml:description> <maml:para>Grants permission to pause/continue the service.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interrogate</maml:name> <maml:description> <maml:para>Grants permission to interrogate the service (i.e. ask it to report its status immediately).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UserDefinedControl</maml:name> <maml:description> <maml:para>Grants permission to run the service's user-defined control.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Delete</maml:name> <maml:description> <maml:para>Grants permission to delete the service.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ReadControl</maml:name> <maml:description> <maml:para>Grants permission to query the service's security descriptor.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>WriteDac</maml:name> <maml:description> <maml:para>Grants permission to set the service's discretionary access list.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>WriteOwner</maml:name> <maml:description> <maml:para>Grants permission to modify the group and owner of a service.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the service to grant permissions to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity to grant permissions for.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FullControl</maml:name> <maml:description> <maml:para>Grant full control on the service</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryConfig</maml:name> <maml:description> <maml:para>Grants permission to query the service's configuration.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ChangeConfig</maml:name> <maml:description> <maml:para>Grants permission to change the service's permission.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QueryStatus</maml:name> <maml:description> <maml:para>Grants permission to query the service's status.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EnumerateDependents</maml:name> <maml:description> <maml:para>Grants permissionto enumerate the service's dependent services.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Start</maml:name> <maml:description> <maml:para>Grants permission to start the service.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Stop</maml:name> <maml:description> <maml:para>Grants permission to stop the service.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PauseContinue</maml:name> <maml:description> <maml:para>Grants permission to pause/continue the service.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interrogate</maml:name> <maml:description> <maml:para>Grants permission to interrogate the service (i.e. ask it to report its status immediately).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UserDefinedControl</maml:name> <maml:description> <maml:para>Grants permission to run the service's user-defined control.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Delete</maml:name> <maml:description> <maml:para>Grants permission to delete the service.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ReadControl</maml:name> <maml:description> <maml:para>Grants permission to query the service's security descriptor.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>WriteDac</maml:name> <maml:description> <maml:para>Grants permission to set the service's discretionary access list.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>WriteOwner</maml:name> <maml:description> <maml:para>Grants permission to modify the group and owner of a service.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Grant-ServicePermission -Identity FALCON\Chewbacca -Name Hyperdrive -QueryStatus -EnumerateDependents -Start -Stop</dev:code> <dev:remarks> <maml:para>Grants Chewbacca the permissions to query, enumerate dependents, start, and stop the `Hyperdrive` service. Coincedentally, these are the permissions that Chewbacca nees to run `Start-Service`, `Stop-Service`, `Restart-Service`, and `Get-Service` cmdlets against the `Hyperdrive` service.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-ServicePermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-ServiceControlPermissions</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Initialize-Lcm</command:name> <maml:description> <maml:para>Configures a computer's DSC Local Configuration Manager (LCM).</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Initialize</command:verb> <command:noun>Lcm</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The Local Configuration Manager (LCM) is the Windows PowerShell Desired State Configuration (DSC) engine. It runs on all target computers, and it is responsible for calling the configuration resources that are included in a DSC configuration script. It can be configured to receive changes (i.e. `Push` mode) or pull and apply changes its own changes (i.e. `Pull` mode). ## Push Mode Push mode is simplest. The LCM only applies configurations that are pushed to it via `Start-DscConfiguration`. It is expected that all resources needed by the LCM are installed and available on the computer. To use `Push` mode, use the `Push` switch. ## Pull Mode In order to get a computer to pulls its configuration automatically, you need to configure its LCM so it knows where and how to find its DSC pull server. The pull server holds all the resources and modules needed by the computer's configuration. The LCM can pull from two sources: a DSC website (the web download manager) or an SMB files hare (the file download manager). To use the web download manager, specify the URL to the website with the `ServerUrl` parameter. To use the file download manager, specify the path to the resources with the `SourcePath` parameter. This path can be an SMB share path or a local (on the LCM's computer) file system path. No matter where the LCM pulls its configuration from, you're responsible for putting all modules, resources, and .mof files at that location. The most frequently the LCM will *download* new configuration is every 15 minutes. This is the minimum interval. The refresh interval is set via the `RefreshIntervalMinutes` parameter. The LCM will only *apply* a configuration on one of the refreshes. At most, it will apply configuration every 2nd refresh (i.e. every other refresh). You can control the frequency when configuration is applied via the `ConfigurationFrequency` parameter. For example, if `RefreshIntervalMinutes` is set to `30`, and `ConfigurationFrequency` is set to 4, then configuration will be downloaded every 30 minutes, and applied every two hours (i.e. `30 * 4 = 120` minutes). The `ConfigurationMode` parameter controls *how* the LCM applies its configuration. It supports three values: * `ApplyOnly`: Configuration is applied once and isn't applied again until a new configuration is detected. If the computer's configuration drifts, no action is taken. * `ApplyAndMonitor`: The same as `ApplyOnly`, but if the configuration drifts, it is reported in event logs. * `ApplyAndAutoCorrect`: The same as `ApplyOnly`, and when the configuratio drifts, the discrepency is reported in event logs, and the LCM attempts to correct the configuration drift. When credentials are needed on the target computer, the DSC system encrypts those credentials with a public key when generating the configuration. Those credentials are then decrypted on the target computer, using the corresponding private key. A computer can't run its configuration until the private key is installed. Use the `CertFile` and `CertPassword` parameters to specify the path to the certificate containing the private key and the private key's password, respectively. This function will upload the certificate to the target computer and install it in the proper Windows certificate store. To generate a public/private key pair, use `New-RsaKeyPair`. Returns an object representing the computer's updated LCM settings. See [Windows PowerShell Desired State Configuration Local Configuration Manager](http://technet.microsoft.com/en-us/library/dn249922.aspx) for more information.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Initialize-Lcm</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Push</maml:name> <maml:description> <maml:para>Configures the LCM to receive its configuration via pushes using `Start-DscConfiguration`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The computer(s) whose Local Configuration Manager to configure.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Credential</maml:name> <maml:description> <maml:para>The credentials to use when connecting to the target computer(s).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CertificateID</maml:name> <maml:description> <maml:para>The thumbprint of the certificate to use to decrypt secrets. If `CertFile` is given, this parameter is ignored in favor of the certificate in `CertFile`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CertFile</maml:name> <maml:description> <maml:para>The path to the certificate containing the private key to use when decrypting credentials. The certificate will be uploaded and installed for you.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CertPassword</maml:name> <maml:description> <maml:para>The password for the certificate specified by `CertFile`. It can be a `string` or a `SecureString`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Object</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RebootIfNeeded</maml:name> <maml:description> <maml:para>Reboot the target computer(s) if needed.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Initialize-Lcm</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ServerUrl</maml:name> <maml:description> <maml:para>Configures the LCM to pull its configuration from a DSC website using the web download manager</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AllowUnsecureConnection</maml:name> <maml:description> <maml:para>When using the web download manager, allow the `ServerUrl` to use an unsecured, http connection when contacting the DSC web pull server.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ConfigurationID</maml:name> <maml:description> <maml:para>The GUID that identifies what configuration to pull to the computer. The Local Configuration Manager will look for a '$Guid.mof' file to pull.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Guid</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ConfigurationMode</maml:name> <maml:description> <maml:para>Specifies how the Local Configuration Manager applies configuration to the target computer(s). It supports three values: `ApplyOnly`, `ApplyAndMonitor`, or `ApplyAndAutoCorrect`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The computer(s) whose Local Configuration Manager to configure.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Credential</maml:name> <maml:description> <maml:para>The credentials to use when connecting to the target computer(s).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AllowModuleOverwrite</maml:name> <maml:description> <maml:para>Controls whether new configurations downloaded from the configuration server are allowed to overwrite the old ones on the target computer(s).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CertificateID</maml:name> <maml:description> <maml:para>The thumbprint of the certificate to use to decrypt secrets. If `CertFile` is given, this parameter is ignored in favor of the certificate in `CertFile`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CertFile</maml:name> <maml:description> <maml:para>The path to the certificate containing the private key to use when decrypting credentials. The certificate will be uploaded and installed for you.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CertPassword</maml:name> <maml:description> <maml:para>The password for the certificate specified by `CertFile`. It can be a `string` or a `SecureString`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Object</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RebootIfNeeded</maml:name> <maml:description> <maml:para>Reboot the target computer(s) if needed.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RefreshIntervalMinutes</maml:name> <maml:description> <maml:para>The interval (in minutes) at which the target computer(s) will contact the pull server to *download* its current configuration. The default (and minimum) interval is 15 minutes.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ConfigurationFrequency</maml:name> <maml:description> <maml:para>The frequency (in number of `RefreshIntervalMinutes`) at which the target computer will run/implement its current configuration. The default (and minimum) frequency is 2 refresh intervals. This value is multiplied by the `RefreshIntervalMinutes` parameter to calculate the interval in minutes that the configuration is applied.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LcmCredential</maml:name> <maml:description> <maml:para>The credentials the Local Configuration Manager should use when contacting the pull server.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Initialize-Lcm</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SourcePath</maml:name> <maml:description> <maml:para>Configures the LCM to pull its configuration from an SMB share or directory. This is the path to the SMB share where resources can be found. Local paths are also allowed, e.g. `C:\DscResources`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ConfigurationID</maml:name> <maml:description> <maml:para>The GUID that identifies what configuration to pull to the computer. The Local Configuration Manager will look for a '$Guid.mof' file to pull.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Guid</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ConfigurationMode</maml:name> <maml:description> <maml:para>Specifies how the Local Configuration Manager applies configuration to the target computer(s). It supports three values: `ApplyOnly`, `ApplyAndMonitor`, or `ApplyAndAutoCorrect`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The computer(s) whose Local Configuration Manager to configure.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Credential</maml:name> <maml:description> <maml:para>The credentials to use when connecting to the target computer(s).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AllowModuleOverwrite</maml:name> <maml:description> <maml:para>Controls whether new configurations downloaded from the configuration server are allowed to overwrite the old ones on the target computer(s).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CertificateID</maml:name> <maml:description> <maml:para>The thumbprint of the certificate to use to decrypt secrets. If `CertFile` is given, this parameter is ignored in favor of the certificate in `CertFile`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CertFile</maml:name> <maml:description> <maml:para>The path to the certificate containing the private key to use when decrypting credentials. The certificate will be uploaded and installed for you.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CertPassword</maml:name> <maml:description> <maml:para>The password for the certificate specified by `CertFile`. It can be a `string` or a `SecureString`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Object</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RebootIfNeeded</maml:name> <maml:description> <maml:para>Reboot the target computer(s) if needed.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RefreshIntervalMinutes</maml:name> <maml:description> <maml:para>The interval (in minutes) at which the target computer(s) will contact the pull server to *download* its current configuration. The default (and minimum) interval is 15 minutes.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ConfigurationFrequency</maml:name> <maml:description> <maml:para>The frequency (in number of `RefreshIntervalMinutes`) at which the target computer will run/implement its current configuration. The default (and minimum) frequency is 2 refresh intervals. This value is multiplied by the `RefreshIntervalMinutes` parameter to calculate the interval in minutes that the configuration is applied.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LcmCredential</maml:name> <maml:description> <maml:para>The credentials the Local Configuration Manager should use when contacting the pull server.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Push</maml:name> <maml:description> <maml:para>Configures the LCM to receive its configuration via pushes using `Start-DscConfiguration`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The computer(s) whose Local Configuration Manager to configure.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Credential</maml:name> <maml:description> <maml:para>The credentials to use when connecting to the target computer(s).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CertificateID</maml:name> <maml:description> <maml:para>The thumbprint of the certificate to use to decrypt secrets. If `CertFile` is given, this parameter is ignored in favor of the certificate in `CertFile`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CertFile</maml:name> <maml:description> <maml:para>The path to the certificate containing the private key to use when decrypting credentials. The certificate will be uploaded and installed for you.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CertPassword</maml:name> <maml:description> <maml:para>The password for the certificate specified by `CertFile`. It can be a `string` or a `SecureString`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Object</command:parameterValue> <dev:type> <maml:name>Object</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RebootIfNeeded</maml:name> <maml:description> <maml:para>Reboot the target computer(s) if needed.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ServerUrl</maml:name> <maml:description> <maml:para>Configures the LCM to pull its configuration from a DSC website using the web download manager</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AllowUnsecureConnection</maml:name> <maml:description> <maml:para>When using the web download manager, allow the `ServerUrl` to use an unsecured, http connection when contacting the DSC web pull server.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ConfigurationID</maml:name> <maml:description> <maml:para>The GUID that identifies what configuration to pull to the computer. The Local Configuration Manager will look for a '$Guid.mof' file to pull.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Guid</command:parameterValue> <dev:type> <maml:name>Guid</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ConfigurationMode</maml:name> <maml:description> <maml:para>Specifies how the Local Configuration Manager applies configuration to the target computer(s). It supports three values: `ApplyOnly`, `ApplyAndMonitor`, or `ApplyAndAutoCorrect`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AllowModuleOverwrite</maml:name> <maml:description> <maml:para>Controls whether new configurations downloaded from the configuration server are allowed to overwrite the old ones on the target computer(s).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RefreshIntervalMinutes</maml:name> <maml:description> <maml:para>The interval (in minutes) at which the target computer(s) will contact the pull server to *download* its current configuration. The default (and minimum) interval is 15 minutes.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ConfigurationFrequency</maml:name> <maml:description> <maml:para>The frequency (in number of `RefreshIntervalMinutes`) at which the target computer will run/implement its current configuration. The default (and minimum) frequency is 2 refresh intervals. This value is multiplied by the `RefreshIntervalMinutes` parameter to calculate the interval in minutes that the configuration is applied.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LcmCredential</maml:name> <maml:description> <maml:para>The credentials the Local Configuration Manager should use when contacting the pull server.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SourcePath</maml:name> <maml:description> <maml:para>Configures the LCM to pull its configuration from an SMB share or directory. This is the path to the SMB share where resources can be found. Local paths are also allowed, e.g. `C:\DscResources`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Initialize-Lcm -Push -ComputerName '1.2.3.4'</dev:code> <dev:remarks> <maml:para>Demonstrates how to configure an LCM to use push mode.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Initialize-Lcm -ConfigurationID 'fc2ffe50-13cd-4cd2-9942-d25ac66d6c13' -ComputerName '10.1.2.3' -ServerUrl 'https://10.4.5.6/PSDSCPullServer.dsc'</dev:code> <dev:remarks> <maml:para>Demonstrates the minimum needed to configure a computer (in this case, `10.1.2.3`) to pull its configuration from a DSC web server.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Initialize-Lcm -ConfigurationID 'fc2ffe50-13cd-4cd2-9942-d25ac66d6c13' -ComputerName '10.1.2.3' -SourcePath '\\10.4.5.6\DSCResources'</dev:code> <dev:remarks> <maml:para>Demonstrates the minimum needed to configure a computer (in this case, `10.1.2.3`) to pull its configuration from an SMB file share.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Initialize-Lcm -CertFile 'D:\Projects\Resources\PrivateKey.pfx' -CertPassword $secureStringPassword -ConfigurationID 'fc2ffe50-13cd-4cd2-9942-d25ac66d6c13' -ComputerName '10.1.2.3' -SourcePath '\\10.4.5.6\DSCResources'</dev:code> <dev:remarks> <maml:para>Demonstrates how to upload the private key certificate on to the targer computer(s).</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Initialize-Lcm -RefreshIntervalMinutes 25 -ConfigurationFrequency 3 -ConfigurationID 'fc2ffe50-13cd-4cd2-9942-d25ac66d6c13' -ComputerName '10.1.2.3' -SourcePath '\\10.4.5.6\DSCResources'</dev:code> <dev:remarks> <maml:para>Demonstrates how to use the `RefreshIntervalMinutes` and `ConfigurationFrequency` parameters to control when the LCM downloads new configuration and applies that configuration. In this case, new configuration is downloaded every 25 minutes, and apllied every 75 minutes (`RefreshIntervalMinutes * ConfigurationFrequency`).</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>New-RsaKeyPair</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Start-DscPullConfiguration</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://technet.microsoft.com/en-us/library/dn249922.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-Certificate</command:name> <maml:description> <maml:para>Installs a certificate in a given store.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>Certificate</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses the .NET certificates API to add a certificate to a store for the machine or current user. The user performing the action must have permission to modify the store or the installation will fail.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-Certificate</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the certificate file.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store. To see a list of acceptable values, run: > [Enum]::GetValues([Security.Cryptography.X509Certificates.StoreLocation])</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreName</maml:name> <maml:description> <maml:para>The name of the certificate's store. To see a list of acceptable values run: > [Enum]::GetValues([Security.Cryptography.X509Certificates.StoreName])</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreName</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Exportable</maml:name> <maml:description> <maml:para>Mark the private key as exportable. Only valid if loading the certificate from a file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password for the certificate. Can be a string or a `System.Security.SecureString`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Object</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-Certificate</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the certificate file.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store. To see a list of acceptable values, run: > [Enum]::GetValues([Security.Cryptography.X509Certificates.StoreLocation])</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CustomStoreName</maml:name> <maml:description> <maml:para>The name of the non-standard, custom store where the certificate should be installed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Exportable</maml:name> <maml:description> <maml:para>Mark the private key as exportable. Only valid if loading the certificate from a file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password for the certificate. Can be a string or a `System.Security.SecureString`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Object</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-Certificate</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Certificate</maml:name> <maml:description> <maml:para>The certificate to install.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">X509Certificate2</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store. To see a list of acceptable values, run: > [Enum]::GetValues([Security.Cryptography.X509Certificates.StoreLocation])</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CustomStoreName</maml:name> <maml:description> <maml:para>The name of the non-standard, custom store where the certificate should be installed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-Certificate</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Certificate</maml:name> <maml:description> <maml:para>The certificate to install.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">X509Certificate2</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store. To see a list of acceptable values, run: > [Enum]::GetValues([Security.Cryptography.X509Certificates.StoreLocation])</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreName</maml:name> <maml:description> <maml:para>The name of the certificate's store. To see a list of acceptable values run: > [Enum]::GetValues([Security.Cryptography.X509Certificates.StoreName])</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreName</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the certificate file.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store. To see a list of acceptable values, run: > [Enum]::GetValues([Security.Cryptography.X509Certificates.StoreLocation])</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> <dev:type> <maml:name>StoreLocation</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreName</maml:name> <maml:description> <maml:para>The name of the certificate's store. To see a list of acceptable values run: > [Enum]::GetValues([Security.Cryptography.X509Certificates.StoreName])</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreName</command:parameterValue> <dev:type> <maml:name>StoreName</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Exportable</maml:name> <maml:description> <maml:para>Mark the private key as exportable. Only valid if loading the certificate from a file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password for the certificate. Can be a string or a `System.Security.SecureString`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Object</command:parameterValue> <dev:type> <maml:name>Object</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CustomStoreName</maml:name> <maml:description> <maml:para>The name of the non-standard, custom store where the certificate should be installed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Certificate</maml:name> <maml:description> <maml:para>The certificate to install.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">X509Certificate2</command:parameterValue> <dev:type> <maml:name>X509Certificate2</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.Security.Cryptography.X509Certificates.X509Certificate2</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>></maml:para> </maml:introduction> <dev:code>Install-Certificate -Path C:\Users\me\certificate.cer -StoreLocation LocalMachine -StoreName My -Exportable -Password My5up3r53cur3P@55w0rd</dev:code> <dev:remarks> <maml:para>Installs the certificate (which is protected by a password) at C:\Users\me\certificate.cer into the local machine's Personal store. The certificate is marked exportable.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-Group</command:name> <maml:description> <maml:para>Creates a new local group, or updates the settings for an existing group.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>Group</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Creates a new group with a description and default set of members. If a group with the same name already exists, it updates the group's description and adds the given members to it.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-Group</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the group.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Description</maml:name> <maml:description> <maml:para>A description of the group.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Member</maml:name> <maml:description> <maml:para>Members of the group.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the group.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Description</maml:name> <maml:description> <maml:para>A description of the group.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Member</maml:name> <maml:description> <maml:para>Members of the group.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-Group -Name TIEFighters -Description 'Users allowed to be TIE fighter pilots.' -Members EMPIRE\Pilots,EMPIRE\DarthVader</dev:code> <dev:remarks> <maml:para>If the TIE fighters group doesn't exist, it is created with the given description and default members. If it already exists, its description is updated and the given members are added to it.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-IisApplication</command:name> <maml:description> <maml:para>Creates a new application under a website.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>IisApplication</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Creates a new application at `VirtualPath` under website `SiteName` running the code found on the file system under `PhysicalPath`, i.e. if SiteName is is `example.com`, the application is accessible at `example.com/VirtualPath`. If an application already exists at that path, it is removed first. The application can run under a custom application pool using the optional `AppPoolName` parameter. If no app pool is specified, the application runs under the same app pool as the website it runs under.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-IisApplication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where the application should be created.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The name of the application.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>PhysicalPath</maml:name> <maml:description> <maml:para>The path to the application.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>AppPoolName</maml:name> <maml:description> <maml:para>The app pool for the application.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where the application should be created.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The name of the application.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>PhysicalPath</maml:name> <maml:description> <maml:para>The path to the application.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>AppPoolName</maml:name> <maml:description> <maml:para>The app pool for the application.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-IisApplication -SiteName Peanuts -VirtualPath CharlieBrown -PhysicalPath C:\Path\To\CharlieBrown -AppPoolName CharlieBrownPool</dev:code> <dev:remarks> <maml:para>Creates an application at `Peanuts/CharlieBrown` which runs from `Path/To/CharlieBrown`. The application runs under the `CharlieBrownPool`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-IisApplication -SiteName Peanuts -VirtualPath Snoopy -PhysicalPath C:\Path\To\Snoopy</dev:code> <dev:remarks> <maml:para>Create an application at Peanuts/Snoopy, which runs from C:\Path\To\Snoopy. It uses the same application as the Peanuts website.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-IisAppPool</command:name> <maml:description> <maml:para>Creates a new app pool.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>IisAppPool</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>By default, creates a 64-bit app pool running as the `ApplicationPoolIdentity` service account under .NET v4.0 with an integrated pipeline. You can control which version of .NET is used to run an app pool with the `ManagedRuntimeVersion` parameter: versions `v1.0`, `v1.1`, `v2.0`, and `v4.0` are supported. To run an application pool using the classic pipeline mode, set the `ClassicPipelineMode` switch. To run an app pool using the 32-bit version of the .NET framework, set the `Enable32BitApps` switch. An app pool can run as several built-in service accounts, by passing one of them as the value of the `ServiceAccount` parameter: `NetworkService`, `LocalService`, or `LocalSystem` The default is `ApplicationPoolIdentity`, which causes IIS to create and use a custom local account with the name of the app pool. See [Application Pool Identities](http://learn.iis.net/page.aspx/624/application-pool-identities/) for more information. To run the app pool as a specific user, pass the username and password for the account to the `Username` and `Password` parameters, respectively. This user will be granted the `SeBatchLogonRight` privilege. If an existing app pool exists with name `Name`, it's settings are modified. The app pool isn't deleted. (You can't delete an app pool if there are any websites using it, that's why.) By default, this function will create an application pool running the latest version of .NET, with an integrated pipeline, as the NetworkService account.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-IisAppPool</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The app pool's name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ManagedRuntimeVersion</maml:name> <maml:description> <maml:para>The managed .NET runtime version to use. Default is 'v4.0'. Valid values are `v1.0`, `v1.1`, `v2.0`, or `v4.0`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IdleTimeout</maml:name> <maml:description> <maml:para>Idle Timeout value in minutes. Default is 0.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ClassicPipelineMode</maml:name> <maml:description> <maml:para>Use the classic pipeline mode, i.e. don't use an integrated pipeline.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Enable32BitApps</maml:name> <maml:description> <maml:para>Enable 32-bit applications.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ServiceAccount</maml:name> <maml:description> <maml:para>Run the app pool under the given local service account. Valid values are `NetworkService`, `LocalService`, and `LocalSystem`. The default is `ApplicationPoolIdentity`, which causes IIS to create a custom local user account for the app pool's identity. The default is `ApplicationPoolIdentity`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-IisAppPool</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The app pool's name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ManagedRuntimeVersion</maml:name> <maml:description> <maml:para>The managed .NET runtime version to use. Default is 'v4.0'. Valid values are `v1.0`, `v1.1`, `v2.0`, or `v4.0`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IdleTimeout</maml:name> <maml:description> <maml:para>Idle Timeout value in minutes. Default is 0.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ClassicPipelineMode</maml:name> <maml:description> <maml:para>Use the classic pipeline mode, i.e. don't use an integrated pipeline.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Enable32BitApps</maml:name> <maml:description> <maml:para>Enable 32-bit applications.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ServiceAccount</maml:name> <maml:description> <maml:para>Run the app pool under the given local service account. Valid values are `NetworkService`, `LocalService`, and `LocalSystem`. The default is `ApplicationPoolIdentity`, which causes IIS to create a custom local user account for the app pool's identity. The default is `ApplicationPoolIdentity`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UserName</maml:name> <maml:description> <maml:para>Runs the app pool under a specific user account.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password for the user account. Can be a string or a SecureString.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Object</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The app pool's name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ManagedRuntimeVersion</maml:name> <maml:description> <maml:para>The managed .NET runtime version to use. Default is 'v4.0'. Valid values are `v1.0`, `v1.1`, `v2.0`, or `v4.0`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IdleTimeout</maml:name> <maml:description> <maml:para>Idle Timeout value in minutes. Default is 0.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ClassicPipelineMode</maml:name> <maml:description> <maml:para>Use the classic pipeline mode, i.e. don't use an integrated pipeline.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Enable32BitApps</maml:name> <maml:description> <maml:para>Enable 32-bit applications.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ServiceAccount</maml:name> <maml:description> <maml:para>Run the app pool under the given local service account. Valid values are `NetworkService`, `LocalService`, and `LocalSystem`. The default is `ApplicationPoolIdentity`, which causes IIS to create a custom local user account for the app pool's identity. The default is `ApplicationPoolIdentity`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UserName</maml:name> <maml:description> <maml:para>Runs the app pool under a specific user account.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password for the user account. Can be a string or a SecureString.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Object</command:parameterValue> <dev:type> <maml:name>Object</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-IisAppPool -Name Cyberdyne -ServiceAccount NetworkService</dev:code> <dev:remarks> <maml:para>Creates a new Cyberdyne application pool, running as NetworkService, using .NET 4.0 and an integrated pipeline. If the Cyberdyne app pool already exists, it is modified to run as NetworkService, to use .NET 4.0 and to use an integrated pipeline.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-IisAppPool -Name Cyberdyne -ServiceAccount NetworkService -Enable32BitApps -ClassicPipelineMode</dev:code> <dev:remarks> <maml:para>Creates or sets the Cyberdyne app pool to run as NetworkService, in 32-bit mode (i.e. 32-bit applications are enabled), using the classic IIS request pipeline.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-IisAppPool -Name Cyberdyne -Username 'PEANUTS\charliebrown' -Password '5noopyrulez'</dev:code> <dev:remarks> <maml:para>Creates or sets the Cyberdyne app pool to run as the `PEANUTS\charliebrown` domain account, under .NET 4.0, with an integrated pipeline.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://learn.iis.net/page.aspx/624/application-pool-identities/</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-IisVirtualDirectory</command:name> <maml:description> <maml:para>Installs a virtual directory.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>IisVirtualDirectory</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>This function creates a virtual directory under website `SiteName` at `/VirtualPath`, serving files out of `PhysicalPath`. If a virtual directory at `VirtualPath` already exists, it is deleted first, and a new virtual directory is created.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-IisVirtualDirectory</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where the virtual directory should be created.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The name of the virtual directory. This can contain multiple directory segments for virtual directories not at the root of the website, e.g. First/Second/VirtualDirectory.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>PhysicalPath</maml:name> <maml:description> <maml:para>The file system path to the virtual directory.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where the virtual directory should be created.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The name of the virtual directory. This can contain multiple directory segments for virtual directories not at the root of the website, e.g. First/Second/VirtualDirectory.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>PhysicalPath</maml:name> <maml:description> <maml:para>The file system path to the virtual directory.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-IisVirtualDirectory -SiteName 'Peanuts' -VirtualPath 'DogHouse' -PhysicalPath C:\Peanuts\Doghouse</dev:code> <dev:remarks> <maml:para>Creates a /DogHouse virtual directory, which serves files from the C:\Peanuts\Doghouse directory. If the Peanuts website responds to hostname `peanuts.com`, the virtual directory is accessible at `peanuts.com/DogHouse`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-IisVirtualDirectory -SiteName 'Peanuts' -VirtualPath 'Brown/Snoopy/DogHouse' -PhysicalPath C:\Peanuts\DogHouse</dev:code> <dev:remarks> <maml:para>Creates a DogHouse virtual directory under the `Peanuts` website at `/Brown/Snoopy/DogHouse` serving files out of the `C:\Peanuts\DogHouse` directory. If the Peanuts website responds to hostname `peanuts.com`, the virtual directory is accessible at `peanuts.com/Brown/Snoopy/DogHouse`.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-IisWebsite</command:name> <maml:description> <maml:para>Installs a website.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>IisWebsite</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Installs a website named `Name`, serving files out of the file system from `PhysicalPath`. If no app pool name is given (via the `AppPoolName` parameter), IIS will pick one for you, usually the `DefaultAppPool`. If a site with name `Name` already exists, it is deleted, and a new site is created. By default, the site listens on all IP addresses on port 80. Set custom bindings with the `Bindings` argument. Multiple bindings are allowed. Each binding must be in this format (in BNF): <PROTOCOL> '/' <IP_ADDRESS> ':' <PORT> ':' [ <HOSTNAME> ] * `PROTOCOL` is one of `http` or `https`. * `IP_ADDRESS` is a literal IP address, or `*` for all of the computer's IP addresses. This function does not validate if `IPADDRESS` is actually in use on the computer. * `PORT` is the port to listen on. * `HOSTNAME` is the website's hostname, for name-based hosting. If no hostname is being used, leave off the `HOSTNAME` part. Valid bindings are: * http/*:80: * https/10.2.3.4:443: * http/*:80:example.com</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-IisWebsite</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the website</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>PhysicalPath</maml:name> <maml:description> <maml:para>The physical path (i.e. on the file system) to the website</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Bindings</maml:name> <maml:description> <maml:para>The site's network bindings. Default is `http/*:80:`. Bindings should be specified in protocol/IPAddress:Port:Hostname format. * Protocol should be http or https. * IPAddress can be a literal IP address or `*`, which means all of the computer's IP addresses. This function does not validate if `IPAddress` is actually in use on this computer. * Leave hostname blank for non-named websites.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AppPoolName</maml:name> <maml:description> <maml:para>The name of the app pool under which the website runs. The app pool must exist. If not provided, IIS picks one for you. No whammy, no whammy!</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the website</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>PhysicalPath</maml:name> <maml:description> <maml:para>The physical path (i.e. on the file system) to the website</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Bindings</maml:name> <maml:description> <maml:para>The site's network bindings. Default is `http/*:80:`. Bindings should be specified in protocol/IPAddress:Port:Hostname format. * Protocol should be http or https. * IPAddress can be a literal IP address or `*`, which means all of the computer's IP addresses. This function does not validate if `IPAddress` is actually in use on this computer. * Leave hostname blank for non-named websites.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AppPoolName</maml:name> <maml:description> <maml:para>The name of the app pool under which the website runs. The app pool must exist. If not provided, IIS picks one for you. No whammy, no whammy!</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-IisWebsite -Name 'Peanuts' -PhysicalPath C:\Peanuts.com</dev:code> <dev:remarks> <maml:para>Creates a website named `Peanuts` serving files out of the `C:\Peanuts.com` directory. The website listens on all the computer's IP addresses on port 80.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-IisWebsite -Name 'Peanuts' -PhysicalPath C:\Peanuts.com -Bindings 'http/*:80:peanuts.com:'</dev:code> <dev:remarks> <maml:para>Creates a website named `Peanuts` which uses name-based hosting to respond to all requests to any of the machine's IP addresses for the `peanuts.com` domain.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-IisWebsite -Name 'Peanuts' -PhysicalPath C:\Peanuts.com -AppPoolName 'PeanutsAppPool'</dev:code> <dev:remarks> <maml:para>Creates a website named `Peanuts` that runs under the `PeanutsAppPool` app pool</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-IisWebsite</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Uninstall-IisWebsite</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-Junction</command:name> <maml:description> <maml:para>Creates a junction, or updates an existing junction if its target is different.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>Junction</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Creates a junction given by `-Link` which points to the path given by `-Target`. If `Link` exists, deletes it and re-creates it if it doesn't point to `Target`. Both `-Link` and `-Target` parameters accept relative paths for values. Any non-rooted paths are converted to full paths using the current location, i.e. the path returned by `Get-Location`. Returns a `System.IO.DirectoryInfo` object for the target path, if one is created. Returns a `System.IO.DirectoryInfo` object for the junction, if it is created and/or updated.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-Junction</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Link</maml:name> <maml:description> <maml:para>The junction to create/update. Relative paths are converted to absolute paths using the current location.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Target</maml:name> <maml:description> <maml:para>The target of the junction, i.e. where the junction will point to. Relative paths are converted to absolute paths using the curent location.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the target directory if it does not exist.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Link</maml:name> <maml:description> <maml:para>The junction to create/update. Relative paths are converted to absolute paths using the current location.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Target</maml:name> <maml:description> <maml:para>The target of the junction, i.e. where the junction will point to. Relative paths are converted to absolute paths using the curent location.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the target directory if it does not exist.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-Junction -Link 'C:\Windows\system32Link' -Target 'C:\Windows\system32'</dev:code> <dev:remarks> <maml:para>Creates the `C:\Windows\system32Link` directory, which points to `C:\Windows\system32`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-Junction -Link C:\Projects\Foobar -Target 'C:\Foo\bar' -Force</dev:code> <dev:remarks> <maml:para>This example demonstrates how to create the target directory if it doesn't exist. After this example runs, the directory `C:\Foo\bar` and junction `C:\Projects\Foobar` will be created.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>New-Junction</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Remove-Junction</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-Msmq</command:name> <maml:description> <maml:para>Installs Microsoft's Message Queueing system/feature.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>Msmq</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Microsoft's MSMQ is *not* installed by default. It has to be turned on manually. This function will enable the MSMQ feature. There are two sub-features: Active Directory integration and HTTP support. These can also be enabled by setting the `ActiveDirectoryIntegration` and `HttpSupport` switches, respectively. If MSMQ will be working with queues on other machines, you'll need to enable DTC (the Distributed Transaction Coordinator) by passing the `DTC` switch. This function uses Microsoft's feature management command line utilities: `ocsetup.exe` or `servermanagercmd.exe`. **A word of warning**, however. In our experience, **these tools do not seem to work as advertised**. They are very slow, and, at least with MSMQ, we have intermittent errors installing it on our developer's Windows 7 computers. We strongly recommend you install MSMQ manually on a base VM or computer image so that it's a standard part of your installation. If that isn't possible in your environment, good luck! let us know how it goes. If you know better ways of installing MSMQ or other Windows features, or can help us figure out why Microsoft's command line installation tools don't work consistently, we would appreciate it.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-Msmq</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HttpSupport</maml:name> <maml:description> <maml:para>Enable HTTP Support</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ActiveDirectoryIntegration</maml:name> <maml:description> <maml:para>Enable Active Directory Integrations</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Dtc</maml:name> <maml:description> <maml:para>Will MSMQ be participating in external, distributed transactions? I.e. will it be sending messages to queues on other machines?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HttpSupport</maml:name> <maml:description> <maml:para>Enable HTTP Support</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ActiveDirectoryIntegration</maml:name> <maml:description> <maml:para>Enable Active Directory Integrations</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Dtc</maml:name> <maml:description> <maml:para>Will MSMQ be participating in external, distributed transactions? I.e. will it be sending messages to queues on other machines?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-Msmq</dev:code> <dev:remarks> <maml:para>Installs MSMQ on this meachine. In our experience, this may or may not work. You'll want to check that the MSMQ service exists and is running after this. Please help us make this better!</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-Msmq -HttpSupport -ActiveDirectoryIntegration -Dtc</dev:code> <dev:remarks> <maml:para>Installs MSMQ with the HTTP support and Active Directory sub-features. Enables and starts the Distributed Transaction Coordinator.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-MsmqMessageQueue</command:name> <maml:description> <maml:para>Installs an MSMQ queue.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>MsmqMessageQueue</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Creates a new queue with name `Name`. If a queue with that name already exists, it is deleted, and a new queue is created. If the queue needs to be private, pass the `Private` switch. If it needs to be transactional, set the `Transactional` switch.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-MsmqMessageQueue</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the queue.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Private</maml:name> <maml:description> <maml:para>Makes a private queue.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Transactional</maml:name> <maml:description> <maml:para>Makes a transactional queue.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the queue.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Private</maml:name> <maml:description> <maml:para>Makes a private queue.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Transactional</maml:name> <maml:description> <maml:para>Makes a transactional queue.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-MsmqMessageQueue -Name MovieQueue</dev:code> <dev:remarks> <maml:para>Installs a public, non-transactional `MovieQueue`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-MsmqMessageQueue -Name CriticsQueue -Private -Transactional</dev:code> <dev:remarks> <maml:para>Installs a private, transactional `CriticsQueue` queue.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-PerformanceCounter</command:name> <maml:description> <maml:para>Installs a performance counter.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>PerformanceCounter</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Creates a new performance counter with a specific name, description, and type under a given category. The counter's category is re-created: its current counters are retrieved, the category is removed, a the category is re-created. Unfortunately, we haven't been able to find any .NET APIs that allow us to delete and create an existing counter. If you're creating a performance counter that relies on an accompanying base counter, use the `BaseName`, `BaseDescription`, and `BaseType` parameters to properly add the base counter.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-PerformanceCounter</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CategoryName</maml:name> <maml:description> <maml:para>The category's name where the counter will be created.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The performance counter's name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Description</maml:name> <maml:description> <maml:para>The performance counter's description (i.e. help message).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Type</maml:name> <maml:description> <maml:para>The performance counter's type (from the Diagnostics.PerformanceCounterType enumeration).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PerformanceCounterType</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Re-create the performance counter even if it already exists.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-PerformanceCounter</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CategoryName</maml:name> <maml:description> <maml:para>The category's name where the counter will be created.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The performance counter's name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Description</maml:name> <maml:description> <maml:para>The performance counter's description (i.e. help message).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Type</maml:name> <maml:description> <maml:para>The performance counter's type (from the Diagnostics.PerformanceCounterType enumeration).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PerformanceCounterType</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>BaseName</maml:name> <maml:description> <maml:para>The base performance counter's name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>BaseDescription</maml:name> <maml:description> <maml:para>The base performance counter's description (i.e. help message).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>BaseType</maml:name> <maml:description> <maml:para>The base performance counter's type (from the Diagnostics.PerformanceCounterType enumeration).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PerformanceCounterType</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Re-create the performance counter even if it already exists.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CategoryName</maml:name> <maml:description> <maml:para>The category's name where the counter will be created.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The performance counter's name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Description</maml:name> <maml:description> <maml:para>The performance counter's description (i.e. help message).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Type</maml:name> <maml:description> <maml:para>The performance counter's type (from the Diagnostics.PerformanceCounterType enumeration).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PerformanceCounterType</command:parameterValue> <dev:type> <maml:name>PerformanceCounterType</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Re-create the performance counter even if it already exists.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>BaseName</maml:name> <maml:description> <maml:para>The base performance counter's name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>BaseDescription</maml:name> <maml:description> <maml:para>The base performance counter's description (i.e. help message).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>BaseType</maml:name> <maml:description> <maml:para>The base performance counter's type (from the Diagnostics.PerformanceCounterType enumeration).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PerformanceCounterType</command:parameterValue> <dev:type> <maml:name>PerformanceCounterType</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-PerformanceCounter -CategoryName ToyotaCamry -Name MilesPerGallon -Description 'The miles per gallon fuel efficiency.' -Type NumberOfItems32</dev:code> <dev:remarks> <maml:para>Creates a new miles per gallon performance counter for the ToyotaCamry category.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-PerformanceCounter -CategoryName "Dispatcher" -Name "Average Dispatch time" -Type AverageTimer32 -BaseName "Average Dispatch Base" -BaseType AverageBase -Force</dev:code> <dev:remarks> <maml:para>Creates a counter to collect average timings, with a base counter. Some counters require base counters, which have to be added a specific way to work properly.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.diagnostics.performancecountertype.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-RegistryKey</command:name> <maml:description> <maml:para>Creates a registry key. If it already exists, does nothing.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>RegistryKey</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Given the path to a registry key, creates the key and all its parents. If the key already exists, nothing happens.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-RegistryKey</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the registry key to create.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the registry key to create.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-RegistryKey -Path 'hklm:\Software\Carbon\Test'</dev:code> <dev:remarks> <maml:para>Creates the `hklm:\Software\Carbon\Temp` registry key if it doesn't already exist.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-ScheduledTask</command:name> <maml:description> <maml:para>Installs a scheduled task on the current computer.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>ScheduledTask</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The `Install-ScheduledTask` function uses `schtasks.exe` to install a scheduled task on the current computer. If a task with the same name already exists, the existing task is left in place. Use the `-Force` switch to force `Install-ScheduledTask` to delete any existing tasks before installation. If a new task is created, a `Carbon.TaskScheduler.TaskInfo` object is returned. The `schtasks.exe` command line application is pretty limited in the kind of tasks it will create. If you need a scheduled task created with options not supported by `Install-ScheduledTask`, you can create an XML file using the [Task Scheduler Schema](http://msdn.microsoft.com/en-us/library/windows/desktop/aa383609.aspx) or create a task with the Task Scheduler MMC then export that task as XML with the `schtasks.exe /query /xml /tn <TaskName>`. Pass the XML file (or the raw XML) with the `TaskXmlFilePath` or `TaskXml` parameters, respectively.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskToRun</maml:name> <maml:description> <maml:para>The task/program to execute, including arguments/parameters.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnEvent</maml:name> <maml:description> <maml:para>Create a scheduled task that runs when events appear in the Windows event log.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EventChannelName</maml:name> <maml:description> <maml:para>The name of the event channel to look at.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EventXPathQuery</maml:name> <maml:description> <maml:para>The XPath event query to use to determine when to fire `OnEvent` tasks.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interactive</maml:name> <maml:description> <maml:para>Enables the task to run interactively only if the user is currently logged on at the time the job runs. The task will only run if the user is logged on. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NoPassword</maml:name> <maml:description> <maml:para>No password is stored. The task runs non-interactively as the given user, who must be logged in. Only local resources are available. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HighestAvailableRunLevel</maml:name> <maml:description> <maml:para>Marks the task for deletion after its final run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Delay</maml:name> <maml:description> <maml:para>The wait time to delay the running of the task after the trigger is fired. Must be less than 10,000 minutes (6 days, 22 hours, and 40 minutes).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Principal</maml:name> <maml:description> <maml:para>The built-in identity to use. The default is `System`. Use the `TaskCredential` parameter to run as non-built-in security principal.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskToRun</maml:name> <maml:description> <maml:para>The task/program to execute, including arguments/parameters.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnIdle</maml:name> <maml:description> <maml:para>Create a scheduled task that runs when the computer is idle for N minutes.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interactive</maml:name> <maml:description> <maml:para>Enables the task to run interactively only if the user is currently logged on at the time the job runs. The task will only run if the user is logged on. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NoPassword</maml:name> <maml:description> <maml:para>No password is stored. The task runs non-interactively as the given user, who must be logged in. Only local resources are available. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HighestAvailableRunLevel</maml:name> <maml:description> <maml:para>Marks the task for deletion after its final run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Principal</maml:name> <maml:description> <maml:para>The built-in identity to use. The default is `System`. Use the `TaskCredential` parameter to run as non-built-in security principal.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskToRun</maml:name> <maml:description> <maml:para>The task/program to execute, including arguments/parameters.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnLogon</maml:name> <maml:description> <maml:para>Create a scheduled task that runs when the user running the task logs on. Requires the `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interactive</maml:name> <maml:description> <maml:para>Enables the task to run interactively only if the user is currently logged on at the time the job runs. The task will only run if the user is logged on. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NoPassword</maml:name> <maml:description> <maml:para>No password is stored. The task runs non-interactively as the given user, who must be logged in. Only local resources are available. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HighestAvailableRunLevel</maml:name> <maml:description> <maml:para>Marks the task for deletion after its final run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Delay</maml:name> <maml:description> <maml:para>The wait time to delay the running of the task after the trigger is fired. Must be less than 10,000 minutes (6 days, 22 hours, and 40 minutes).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Principal</maml:name> <maml:description> <maml:para>The built-in identity to use. The default is `System`. Use the `TaskCredential` parameter to run as non-built-in security principal.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskToRun</maml:name> <maml:description> <maml:para>The task/program to execute, including arguments/parameters.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnStart</maml:name> <maml:description> <maml:para>Create a scheduled task that runs at startup.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interactive</maml:name> <maml:description> <maml:para>Enables the task to run interactively only if the user is currently logged on at the time the job runs. The task will only run if the user is logged on. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NoPassword</maml:name> <maml:description> <maml:para>No password is stored. The task runs non-interactively as the given user, who must be logged in. Only local resources are available. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HighestAvailableRunLevel</maml:name> <maml:description> <maml:para>Marks the task for deletion after its final run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Delay</maml:name> <maml:description> <maml:para>The wait time to delay the running of the task after the trigger is fired. Must be less than 10,000 minutes (6 days, 22 hours, and 40 minutes).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Principal</maml:name> <maml:description> <maml:para>The built-in identity to use. The default is `System`. Use the `TaskCredential` parameter to run as non-built-in security principal.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskToRun</maml:name> <maml:description> <maml:para>The task/program to execute, including arguments/parameters.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Once</maml:name> <maml:description> <maml:para>Create a scheduled task that runs once.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartDate</maml:name> <maml:description> <maml:para>The date the task can start running.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>The start time to run the task. Must be less than `24:00`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interactive</maml:name> <maml:description> <maml:para>Enables the task to run interactively only if the user is currently logged on at the time the job runs. The task will only run if the user is logged on. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NoPassword</maml:name> <maml:description> <maml:para>No password is stored. The task runs non-interactively as the given user, who must be logged in. Only local resources are available. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HighestAvailableRunLevel</maml:name> <maml:description> <maml:para>Marks the task for deletion after its final run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Principal</maml:name> <maml:description> <maml:para>The built-in identity to use. The default is `System`. Use the `TaskCredential` parameter to run as non-built-in security principal.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskToRun</maml:name> <maml:description> <maml:para>The task/program to execute, including arguments/parameters.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Month</maml:name> <maml:description> <maml:para>Create a scheduled task that runs on specific months. To create a monthly task, use the `Monthly` switch.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Month[]</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>WeekOfMonth</maml:name> <maml:description> <maml:para>Create a scheduled task that runs a particular week of the month.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">WeekOfMonth</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DayOfWeek</maml:name> <maml:description> <maml:para>The day of the week to run the task. Default is today.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">DayOfWeek[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interval</maml:name> <maml:description> <maml:para>Re-run the task every N minutes.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartDate</maml:name> <maml:description> <maml:para>The date the task can start running.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>The start time to run the task. Must be less than `24:00`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Duration</maml:name> <maml:description> <maml:para>The duration to run the task. Usually used with `Interval` to repeatedly run a task over a given time span. By default, re-runs for an hour. Can't be used with `EndTime`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndDate</maml:name> <maml:description> <maml:para>The last date the task should run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>The end time to run the task. Must be less than `24:00`. Can't be used with `Duration`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interactive</maml:name> <maml:description> <maml:para>Enables the task to run interactively only if the user is currently logged on at the time the job runs. The task will only run if the user is logged on. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NoPassword</maml:name> <maml:description> <maml:para>No password is stored. The task runs non-interactively as the given user, who must be logged in. Only local resources are available. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HighestAvailableRunLevel</maml:name> <maml:description> <maml:para>Marks the task for deletion after its final run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Principal</maml:name> <maml:description> <maml:para>The built-in identity to use. The default is `System`. Use the `TaskCredential` parameter to run as non-built-in security principal.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskToRun</maml:name> <maml:description> <maml:para>The task/program to execute, including arguments/parameters.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LastDayOfMonth</maml:name> <maml:description> <maml:para>Create a scheduled task that runs on the last day of every month. To run on specific months, specify the `Month` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Month</maml:name> <maml:description> <maml:para>Create a scheduled task that runs on specific months. To create a monthly task, use the `Monthly` switch.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Month[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interval</maml:name> <maml:description> <maml:para>Re-run the task every N minutes.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartDate</maml:name> <maml:description> <maml:para>The date the task can start running.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>The start time to run the task. Must be less than `24:00`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Duration</maml:name> <maml:description> <maml:para>The duration to run the task. Usually used with `Interval` to repeatedly run a task over a given time span. By default, re-runs for an hour. Can't be used with `EndTime`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndDate</maml:name> <maml:description> <maml:para>The last date the task should run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>The end time to run the task. Must be less than `24:00`. Can't be used with `Duration`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interactive</maml:name> <maml:description> <maml:para>Enables the task to run interactively only if the user is currently logged on at the time the job runs. The task will only run if the user is logged on. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NoPassword</maml:name> <maml:description> <maml:para>No password is stored. The task runs non-interactively as the given user, who must be logged in. Only local resources are available. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HighestAvailableRunLevel</maml:name> <maml:description> <maml:para>Marks the task for deletion after its final run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Principal</maml:name> <maml:description> <maml:para>The built-in identity to use. The default is `System`. Use the `TaskCredential` parameter to run as non-built-in security principal.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskToRun</maml:name> <maml:description> <maml:para>The task/program to execute, including arguments/parameters.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Month</maml:name> <maml:description> <maml:para>Create a scheduled task that runs on specific months. To create a monthly task, use the `Monthly` switch.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Month[]</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DayOfMonth</maml:name> <maml:description> <maml:para>The day of the month to run a monthly task.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interval</maml:name> <maml:description> <maml:para>Re-run the task every N minutes.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartDate</maml:name> <maml:description> <maml:para>The date the task can start running.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>The start time to run the task. Must be less than `24:00`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Duration</maml:name> <maml:description> <maml:para>The duration to run the task. Usually used with `Interval` to repeatedly run a task over a given time span. By default, re-runs for an hour. Can't be used with `EndTime`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndDate</maml:name> <maml:description> <maml:para>The last date the task should run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>The end time to run the task. Must be less than `24:00`. Can't be used with `Duration`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interactive</maml:name> <maml:description> <maml:para>Enables the task to run interactively only if the user is currently logged on at the time the job runs. The task will only run if the user is logged on. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NoPassword</maml:name> <maml:description> <maml:para>No password is stored. The task runs non-interactively as the given user, who must be logged in. Only local resources are available. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HighestAvailableRunLevel</maml:name> <maml:description> <maml:para>Marks the task for deletion after its final run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Principal</maml:name> <maml:description> <maml:para>The built-in identity to use. The default is `System`. Use the `TaskCredential` parameter to run as non-built-in security principal.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskToRun</maml:name> <maml:description> <maml:para>The task/program to execute, including arguments/parameters.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Monthly</maml:name> <maml:description> <maml:para>Create a scheduled task that runs every month.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DayOfMonth</maml:name> <maml:description> <maml:para>The day of the month to run a monthly task.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interval</maml:name> <maml:description> <maml:para>Re-run the task every N minutes.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartDate</maml:name> <maml:description> <maml:para>The date the task can start running.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>The start time to run the task. Must be less than `24:00`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Duration</maml:name> <maml:description> <maml:para>The duration to run the task. Usually used with `Interval` to repeatedly run a task over a given time span. By default, re-runs for an hour. Can't be used with `EndTime`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndDate</maml:name> <maml:description> <maml:para>The last date the task should run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>The end time to run the task. Must be less than `24:00`. Can't be used with `Duration`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interactive</maml:name> <maml:description> <maml:para>Enables the task to run interactively only if the user is currently logged on at the time the job runs. The task will only run if the user is logged on. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NoPassword</maml:name> <maml:description> <maml:para>No password is stored. The task runs non-interactively as the given user, who must be logged in. Only local resources are available. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HighestAvailableRunLevel</maml:name> <maml:description> <maml:para>Marks the task for deletion after its final run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Principal</maml:name> <maml:description> <maml:para>The built-in identity to use. The default is `System`. Use the `TaskCredential` parameter to run as non-built-in security principal.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskToRun</maml:name> <maml:description> <maml:para>The task/program to execute, including arguments/parameters.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Weekly</maml:name> <maml:description> <maml:para>Creates a scheduled task that runs every N weeks.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DayOfWeek</maml:name> <maml:description> <maml:para>The day of the week to run the task. Default is today.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DayOfWeek[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interval</maml:name> <maml:description> <maml:para>Re-run the task every N minutes.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartDate</maml:name> <maml:description> <maml:para>The date the task can start running.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>The start time to run the task. Must be less than `24:00`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Duration</maml:name> <maml:description> <maml:para>The duration to run the task. Usually used with `Interval` to repeatedly run a task over a given time span. By default, re-runs for an hour. Can't be used with `EndTime`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndDate</maml:name> <maml:description> <maml:para>The last date the task should run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>The end time to run the task. Must be less than `24:00`. Can't be used with `Duration`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interactive</maml:name> <maml:description> <maml:para>Enables the task to run interactively only if the user is currently logged on at the time the job runs. The task will only run if the user is logged on. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NoPassword</maml:name> <maml:description> <maml:para>No password is stored. The task runs non-interactively as the given user, who must be logged in. Only local resources are available. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HighestAvailableRunLevel</maml:name> <maml:description> <maml:para>Marks the task for deletion after its final run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Principal</maml:name> <maml:description> <maml:para>The built-in identity to use. The default is `System`. Use the `TaskCredential` parameter to run as non-built-in security principal.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskToRun</maml:name> <maml:description> <maml:para>The task/program to execute, including arguments/parameters.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Daily</maml:name> <maml:description> <maml:para>Creates a scheduled task that runs every N days.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interval</maml:name> <maml:description> <maml:para>Re-run the task every N minutes.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartDate</maml:name> <maml:description> <maml:para>The date the task can start running.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>The start time to run the task. Must be less than `24:00`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Duration</maml:name> <maml:description> <maml:para>The duration to run the task. Usually used with `Interval` to repeatedly run a task over a given time span. By default, re-runs for an hour. Can't be used with `EndTime`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndDate</maml:name> <maml:description> <maml:para>The last date the task should run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>The end time to run the task. Must be less than `24:00`. Can't be used with `Duration`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interactive</maml:name> <maml:description> <maml:para>Enables the task to run interactively only if the user is currently logged on at the time the job runs. The task will only run if the user is logged on. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NoPassword</maml:name> <maml:description> <maml:para>No password is stored. The task runs non-interactively as the given user, who must be logged in. Only local resources are available. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HighestAvailableRunLevel</maml:name> <maml:description> <maml:para>Marks the task for deletion after its final run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Principal</maml:name> <maml:description> <maml:para>The built-in identity to use. The default is `System`. Use the `TaskCredential` parameter to run as non-built-in security principal.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskToRun</maml:name> <maml:description> <maml:para>The task/program to execute, including arguments/parameters.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Hourly</maml:name> <maml:description> <maml:para>Create a scheduled task that runs every N hours.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StopAtEnd</maml:name> <maml:description> <maml:para>Stops the task at the `EndTime` or `Duration` if it is still running.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartDate</maml:name> <maml:description> <maml:para>The date the task can start running.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>The start time to run the task. Must be less than `24:00`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Duration</maml:name> <maml:description> <maml:para>The duration to run the task. Usually used with `Interval` to repeatedly run a task over a given time span. By default, re-runs for an hour. Can't be used with `EndTime`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndDate</maml:name> <maml:description> <maml:para>The last date the task should run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>The end time to run the task. Must be less than `24:00`. Can't be used with `Duration`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interactive</maml:name> <maml:description> <maml:para>Enables the task to run interactively only if the user is currently logged on at the time the job runs. The task will only run if the user is logged on. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NoPassword</maml:name> <maml:description> <maml:para>No password is stored. The task runs non-interactively as the given user, who must be logged in. Only local resources are available. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HighestAvailableRunLevel</maml:name> <maml:description> <maml:para>Marks the task for deletion after its final run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Principal</maml:name> <maml:description> <maml:para>The built-in identity to use. The default is `System`. Use the `TaskCredential` parameter to run as non-built-in security principal.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskToRun</maml:name> <maml:description> <maml:para>The task/program to execute, including arguments/parameters.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Minute</maml:name> <maml:description> <maml:para>Create a scheduled task that runs every N minutes.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StopAtEnd</maml:name> <maml:description> <maml:para>Stops the task at the `EndTime` or `Duration` if it is still running.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartDate</maml:name> <maml:description> <maml:para>The date the task can start running.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>The start time to run the task. Must be less than `24:00`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Duration</maml:name> <maml:description> <maml:para>The duration to run the task. Usually used with `Interval` to repeatedly run a task over a given time span. By default, re-runs for an hour. Can't be used with `EndTime`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndDate</maml:name> <maml:description> <maml:para>The last date the task should run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>The end time to run the task. Must be less than `24:00`. Can't be used with `Duration`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interactive</maml:name> <maml:description> <maml:para>Enables the task to run interactively only if the user is currently logged on at the time the job runs. The task will only run if the user is logged on. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NoPassword</maml:name> <maml:description> <maml:para>No password is stored. The task runs non-interactively as the given user, who must be logged in. Only local resources are available. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HighestAvailableRunLevel</maml:name> <maml:description> <maml:para>Marks the task for deletion after its final run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Principal</maml:name> <maml:description> <maml:para>The built-in identity to use. The default is `System`. Use the `TaskCredential` parameter to run as non-built-in security principal.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskXmlFilePath</maml:name> <maml:description> <maml:para>Install the task from this XML path.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskXml</maml:name> <maml:description> <maml:para>Install the task from this XML.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">XmlDocument</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the scheduled task to create. Paths are allowed to create tasks under folders.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskToRun</maml:name> <maml:description> <maml:para>The task/program to execute, including arguments/parameters.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnEvent</maml:name> <maml:description> <maml:para>Create a scheduled task that runs when events appear in the Windows event log.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EventChannelName</maml:name> <maml:description> <maml:para>The name of the event channel to look at.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EventXPathQuery</maml:name> <maml:description> <maml:para>The XPath event query to use to determine when to fire `OnEvent` tasks.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interactive</maml:name> <maml:description> <maml:para>Enables the task to run interactively only if the user is currently logged on at the time the job runs. The task will only run if the user is logged on. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>NoPassword</maml:name> <maml:description> <maml:para>No password is stored. The task runs non-interactively as the given user, who must be logged in. Only local resources are available. Must be used with `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>HighestAvailableRunLevel</maml:name> <maml:description> <maml:para>Marks the task for deletion after its final run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Delay</maml:name> <maml:description> <maml:para>The wait time to delay the running of the task after the trigger is fired. Must be less than 10,000 minutes (6 days, 22 hours, and 40 minutes).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> <dev:type> <maml:name>TimeSpan</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskCredential</maml:name> <maml:description> <maml:para>The principal the task should run as. Use `Principal` parameter to run as a built-in security principal. Required if `Interactive` or `NoPassword` switches are used.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Principal</maml:name> <maml:description> <maml:para>The built-in identity to use. The default is `System`. Use the `TaskCredential` parameter to run as non-built-in security principal.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Create the task even if a task with the same name already exists (i.e. delete any task with the same name before installation).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnIdle</maml:name> <maml:description> <maml:para>Create a scheduled task that runs when the computer is idle for N minutes.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnLogon</maml:name> <maml:description> <maml:para>Create a scheduled task that runs when the user running the task logs on. Requires the `TaskCredential` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnStart</maml:name> <maml:description> <maml:para>Create a scheduled task that runs at startup.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Once</maml:name> <maml:description> <maml:para>Create a scheduled task that runs once.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartDate</maml:name> <maml:description> <maml:para>The date the task can start running.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> <dev:type> <maml:name>DateTime</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartTime</maml:name> <maml:description> <maml:para>The start time to run the task. Must be less than `24:00`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">TimeSpan</command:parameterValue> <dev:type> <maml:name>TimeSpan</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Month</maml:name> <maml:description> <maml:para>Create a scheduled task that runs on specific months. To create a monthly task, use the `Monthly` switch.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Month[]</command:parameterValue> <dev:type> <maml:name>Month[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>WeekOfMonth</maml:name> <maml:description> <maml:para>Create a scheduled task that runs a particular week of the month.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">WeekOfMonth</command:parameterValue> <dev:type> <maml:name>WeekOfMonth</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DayOfWeek</maml:name> <maml:description> <maml:para>The day of the week to run the task. Default is today.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">DayOfWeek[]</command:parameterValue> <dev:type> <maml:name>DayOfWeek[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Interval</maml:name> <maml:description> <maml:para>Re-run the task every N minutes.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Duration</maml:name> <maml:description> <maml:para>The duration to run the task. Usually used with `Interval` to repeatedly run a task over a given time span. By default, re-runs for an hour. Can't be used with `EndTime`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> <dev:type> <maml:name>TimeSpan</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndDate</maml:name> <maml:description> <maml:para>The last date the task should run.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> <dev:type> <maml:name>DateTime</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>EndTime</maml:name> <maml:description> <maml:para>The end time to run the task. Must be less than `24:00`. Can't be used with `Duration`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">TimeSpan</command:parameterValue> <dev:type> <maml:name>TimeSpan</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LastDayOfMonth</maml:name> <maml:description> <maml:para>Create a scheduled task that runs on the last day of every month. To run on specific months, specify the `Month` parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DayOfMonth</maml:name> <maml:description> <maml:para>The day of the month to run a monthly task.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Monthly</maml:name> <maml:description> <maml:para>Create a scheduled task that runs every month.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Weekly</maml:name> <maml:description> <maml:para>Creates a scheduled task that runs every N weeks.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Daily</maml:name> <maml:description> <maml:para>Creates a scheduled task that runs every N days.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Hourly</maml:name> <maml:description> <maml:para>Create a scheduled task that runs every N hours.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StopAtEnd</maml:name> <maml:description> <maml:para>Stops the task at the `EndTime` or `Duration` if it is still running.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Minute</maml:name> <maml:description> <maml:para>Create a scheduled task that runs every N minutes.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskXmlFilePath</maml:name> <maml:description> <maml:para>Install the task from this XML path.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TaskXml</maml:name> <maml:description> <maml:para>Install the task from this XML.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">XmlDocument</command:parameterValue> <dev:type> <maml:name>XmlDocument</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>Carbon.TaskScheduler.TaskInfo</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'C:\Windows\system32\notepad.exe' -Minute 5</dev:code> <dev:remarks> <maml:para>Creates a scheduled task "CarbonSample" to run notepad.exe every five minutes. No credential or principal is provided, so the task will run as `System`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'C:\Windows\system32\notepad.exe' -Minute 1 -TaskCredential (Get-Credential 'runasuser')</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task every minute as a specific user with the `TaskCredential` parameter.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'C:\Windows\system32\notepad.exe' -Minute 1 -Principal LocalService</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task every minute as a built-in principal, in this case `Local Service`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'calc.exe' -Minute 5 -StartTime '12:00' -EndTime '14:00' -StartDate '6/6/2006' -EndDate '6/6/2006'</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task every 5 minutes between the given start date/time and end date/time. In this case, the task will run between noon and 2 pm on `6/6/2006`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad' -Hourly 1</dev:code> <dev:remarks> <maml:para>Creates a scheduled task `CarbonSample` which runs `notepad.exe` every hour as the `LocalService` user.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 6 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -Weekly 1</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task ever *N* weeks, in this case every week.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 7 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -Monthly</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task the 1st of every month.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 8 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -Monthly -DayOfMonth 15</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a monthly task on a specific day of the month.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 9 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -Month 1,4,7,10 -DayOfMonth 5</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task on specific months of the year on a specific day of the month.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 10 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -WeekOfMonth First -DayOfWeek Sunday</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task on a specific week of each month. In this case, the task will run the first Sunday of every month.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 11 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -Month 1,5,9 -WeekOfMonth First -DayOfWeek Sunday</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task on a specific week of specific months. In this case, the task will run the first Sunday of January, May, and September.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 12 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -LastDayOfMonth</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task the last day of every month.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 13 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -LastDayOfMonth -Month 1,6</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task the last day of specific months. In this case, the task will run the last day of January and June.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 14 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -Once -StartTime '0:00'</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task once. In this case, the task will run at midnight of today (which means it probably won't run since it is always past midnight).</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 15 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -OnStart</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task when the computer starts up.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 16 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -OnStart -Delay '0:30'</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task when the computer starts up after a certain amount of time passes. In this case, the task will run 30 minutes after the computer starts.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 17 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -OnLogon -TaskCredential (Get-Credential 'runasuser')</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task when the user running the task logs on. Usually you want to pass a credential when setting up a logon task, since the built-in users never log in.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 18 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -OnLogon -Delay '1:45' -TaskCredential (Get-Credential 'runasuser')</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task after a certain amount of time passes after a user logs in. In this case, the task will run after 1 hour and 45 minutes after `runasuser` logs in.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 19 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -OnIdle</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task when the computer is idle.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 20 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -OnIdle -Delay '0:05'</dev:code> <dev:remarks> <maml:para>Demonstrates how to run a task when the computer has been idle for a desired amount of time. In this case, the task will run after the computer has been idle for 5 minutes.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 21 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'wevtvwr.msc' -OnEvent -EventChannelName System -EventXPathQuery '*[Sytem/EventID=101]'</dev:code> <dev:remarks> <maml:para>Demonstrates how to run an event when certain events are written to the event log. In this case, wevtvwr.msc will run whenever an event with ID `101` is published in the System event channel.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 22 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -TaskXmlFilePath $taskXmlPath</dev:code> <dev:remarks> <maml:para>Demonstrates how to create a task using the [Task Scheduler XML schema](http://msdn.microsoft.com/en-us/library/windows/desktop/aa383609.aspx) for a task that runs as a built-in principal. You can export task XML with the `schtasks /query /xml /tn <Name>` command.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 23 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -TaskXmlFilePath $taskXmlPath -TaskCredential (Get-Credential 'runasuser')</dev:code> <dev:remarks> <maml:para>Demonstrates how to create a task using the [Task Scheduler XML schema](http://msdn.microsoft.com/en-us/library/windows/desktop/aa383609.aspx) for a task that will run as a specific user. The username in the XML file should match the username in the credential.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 24 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -TaskXml $taskXml</dev:code> <dev:remarks> <maml:para>Demonstrates how to create a task using raw XML that conforms to the [Task Scheduler XML schema](http://msdn.microsoft.com/en-us/library/windows/desktop/aa383609.aspx) for a task that will run as a built-in principal. In this case, `$taskXml` should be an XML document.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 25 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonSample' -TaskToRun 'notepad.exe' -TaskXml $taskXml -TaskCredential (Get-Credential 'runasuser')</dev:code> <dev:remarks> <maml:para>Demonstrates how to create a task using raw XML that conforms to the [Task Scheduler XML schema](http://msdn.microsoft.com/en-us/library/windows/desktop/aa383609.aspx) for a task that will run as a specific user. In this case, `$taskXml` should be an XML document. The username in the XML document should match the username in the credential.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 26 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-ScheduledTask -Name 'CarbonTasks\CarbonSample' -TaskToRun 'notepad.exe' -Monthly</dev:code> <dev:remarks> <maml:para>Demonstrates how to create tasks under a folder/directory: use a path for the `Name` parameter.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-ScheduledTask</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-ScheduledTask</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Uninstall-ScheduledTask</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://technet.microsoft.com/en-us/library/cc725744.aspx#BKMK_create</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/windows/desktop/aa383609.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-Service</command:name> <maml:description> <maml:para>Installs a Windows service.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>Service</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Installs a Windows service. If a service with the given name already exists, it is stopped, its configuration is updated to match the parameters passed in, and then re-started. A `ServiceController` object is returned. If the service's configuration is unchanged, the function returns nothing without making any changes. Settings whose parameters are omitted are reset to their default values. By default, the service is installed to run as `NetworkService`. Set the `Username` and `Password` arguments to run as a different account. This user will be granted the logon as a service right. To run as a system account other than `NetworkService`, provide just the account's name as the `UserName` parameter, and omit the `Password` parameter. The minimum required information to install a service is its name and path. [Managed service accounts and virtual accounts](http://technet.microsoft.com/en-us/library/dd548356.aspx) should be supported (we don't know how to test, so can't be sure). Simply omit the `-Password` parameter when providing a custom account name with the `-Username` parameter. `Manual` services are not started. `Automatic` services are started after installation. If an existing manual service is started when configuration begins, it is re-started after re-configured.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-Service</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the service.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the service.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartupType</maml:name> <maml:description> <maml:para>The startup type: automatic, manual, or disabled. Default is automatic.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">ServiceStartMode</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnFirstFailure</maml:name> <maml:description> <maml:para>What to do on the service's first failure. Default is to take no action.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">FailureAction</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnSecondFailure</maml:name> <maml:description> <maml:para>What to do on the service's second failure. Default is to take no action.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">FailureAction</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnThirdFailure</maml:name> <maml:description> <maml:para>What to do on the service' third failure. Default is to take no action.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">FailureAction</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ResetFailureCount</maml:name> <maml:description> <maml:para>How many seconds after which the failure count is reset to 0.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RestartDelay</maml:name> <maml:description> <maml:para>How many milliseconds to wait before restarting the service. Default is 60,0000, or 1 minute.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RebootDelay</maml:name> <maml:description> <maml:para>How many milliseconds to wait before handling the second failure. Default is 60,000 or 1 minute.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Dependency</maml:name> <maml:description> <maml:para>What other services does this service depend on?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Command</maml:name> <maml:description> <maml:para>The command to run when a service fails, including path to the command and arguments.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RunCommandDelay</maml:name> <maml:description> <maml:para>How many milliseconds to wait before running the failure command. Default is 0, or immediately.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Update the service even if there are no changes.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-Service</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the service.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the service.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartupType</maml:name> <maml:description> <maml:para>The startup type: automatic, manual, or disabled. Default is automatic.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">ServiceStartMode</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnFirstFailure</maml:name> <maml:description> <maml:para>What to do on the service's first failure. Default is to take no action.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">FailureAction</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnSecondFailure</maml:name> <maml:description> <maml:para>What to do on the service's second failure. Default is to take no action.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">FailureAction</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnThirdFailure</maml:name> <maml:description> <maml:para>What to do on the service' third failure. Default is to take no action.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">FailureAction</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ResetFailureCount</maml:name> <maml:description> <maml:para>How many seconds after which the failure count is reset to 0.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RestartDelay</maml:name> <maml:description> <maml:para>How many milliseconds to wait before restarting the service. Default is 60,0000, or 1 minute.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RebootDelay</maml:name> <maml:description> <maml:para>How many milliseconds to wait before handling the second failure. Default is 60,000 or 1 minute.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Dependency</maml:name> <maml:description> <maml:para>What other services does this service depend on?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Command</maml:name> <maml:description> <maml:para>The command to run when a service fails, including path to the command and arguments.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RunCommandDelay</maml:name> <maml:description> <maml:para>How many milliseconds to wait before running the failure command. Default is 0, or immediately.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Username</maml:name> <maml:description> <maml:para>The user the service should run as. Default is NetworkService.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The user's password.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Update the service even if there are no changes.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the service.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the service.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StartupType</maml:name> <maml:description> <maml:para>The startup type: automatic, manual, or disabled. Default is automatic.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">ServiceStartMode</command:parameterValue> <dev:type> <maml:name>ServiceStartMode</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnFirstFailure</maml:name> <maml:description> <maml:para>What to do on the service's first failure. Default is to take no action.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">FailureAction</command:parameterValue> <dev:type> <maml:name>FailureAction</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnSecondFailure</maml:name> <maml:description> <maml:para>What to do on the service's second failure. Default is to take no action.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">FailureAction</command:parameterValue> <dev:type> <maml:name>FailureAction</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OnThirdFailure</maml:name> <maml:description> <maml:para>What to do on the service' third failure. Default is to take no action.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">FailureAction</command:parameterValue> <dev:type> <maml:name>FailureAction</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ResetFailureCount</maml:name> <maml:description> <maml:para>How many seconds after which the failure count is reset to 0.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RestartDelay</maml:name> <maml:description> <maml:para>How many milliseconds to wait before restarting the service. Default is 60,0000, or 1 minute.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RebootDelay</maml:name> <maml:description> <maml:para>How many milliseconds to wait before handling the second failure. Default is 60,000 or 1 minute.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Dependency</maml:name> <maml:description> <maml:para>What other services does this service depend on?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Command</maml:name> <maml:description> <maml:para>The command to run when a service fails, including path to the command and arguments.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>RunCommandDelay</maml:name> <maml:description> <maml:para>How many milliseconds to wait before running the failure command. Default is 0, or immediately.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Update the service even if there are no changes.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Username</maml:name> <maml:description> <maml:para>The user the service should run as. Default is NetworkService.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The user's password.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-Service -Name DeathStar -Path C:\ALongTimeAgo\InAGalaxyFarFarAway\DeathStar.exe</dev:code> <dev:remarks> <maml:para>Installs the Death Star service, which runs the service executable at `C:\ALongTimeAgo\InAGalaxyFarFarAway\DeathStar.exe`. The service runs as `NetworkService` and will start automatically.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-Service -Name DeathStar -Path C:\ALongTimeAgo\InAGalaxyFarFarAway\DeathStar.exe -StartupType Manual</dev:code> <dev:remarks> <maml:para>Install the Death Star service to startup manually. You certainly don't want the thing roaming the galaxy, destroying thing willy-nilly, do you?</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-Service -Name DeathStar -Path C:\ALongTimeAgo\InAGalaxyFarFarAway\DeathStar.exe -Username EMPIRE\wtarkin -Password 5irewh3nready</dev:code> <dev:remarks> <maml:para>Installs the Death Star service to run as Grand Moff Tarkin, who is given the log on as a service right.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-Service -Name DeathStar -Path C:\ALongTimeAgo\InAGalaxyFarFarAway\DeathStar.exe -Username SYSTEM</dev:code> <dev:remarks> <maml:para>Demonstrates how to install a service to run as a system account other than `NetworkService`. Installs the DeathStart service to run as the local `System` account.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-Service -Name DeathStar -Path C:\ALongTimeAgo\InAGalaxyFarFarAway\DeathStar.exe -OnFirstFailure RunCommand -RunCommandDelay 5000 -Command 'engage_hyperdrive.exe "Corruscant"' -OnSecondFailure Restart -RestartDelay 30000 -OnThirdFailure Reboot -RebootDelay 120000 -ResetFailureCount (60*60*24)</dev:code> <dev:remarks> <maml:para>Demonstrates how to control the service's failure actions. On the first failure, Windows will run the `engage-hyperdrive.exe "Corruscant"` command after 5 seconds (`5,000` milliseconds). On the second failure, Windows will restart the service after 30 seconds (`30,000` milliseconds). On the third failure, Windows will reboot after two minutes (`120,000` milliseconds). The failure count gets reset once a day (`60*60*24` seconds).</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Carbon_Service</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Uninstall-Service</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://technet.microsoft.com/en-us/library/dd548356.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-SmbShare</command:name> <maml:description> <maml:para>Creates a share, replacing any existing share with the same name.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>SmbShare</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Creates a new Windows SMB share, or replaces an existing share with the same name. Optionally grants permissions on that share. Unfortunately, there isn't a way in Carbon to set permissions on a share after it is created. Send us the code! Permissions don't apply to the file system. They only apply to the share. Use `Grant-Permission` to grant file system permissions.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-SmbShare</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The share's name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the share.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Description</maml:name> <maml:description> <maml:para>A description of the share</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>FullAccess</maml:name> <maml:description> <maml:para>The identities who have full access to the share.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4"> <maml:name>ChangeAccess</maml:name> <maml:description> <maml:para>The identities who have change access to the share.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="5"> <maml:name>ReadAccess</maml:name> <maml:description> <maml:para>The identities who have read access to the share</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The share's name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the share.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Description</maml:name> <maml:description> <maml:para>A description of the share</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>FullAccess</maml:name> <maml:description> <maml:para>The identities who have full access to the share.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4"> <maml:name>ChangeAccess</maml:name> <maml:description> <maml:para>The identities who have change access to the share.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="5"> <maml:name>ReadAccess</maml:name> <maml:description> <maml:para>The identities who have read access to the share</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-Share -Name TopSecretDocuments -Path C:\TopSecret -Description 'Share for our top secret documents.' -ReadAccess "Everyone" -FullAccess "Analysts"</dev:code> <dev:remarks> <maml:para>Shares the C:\TopSecret directory as `TopSecretDocuments` and grants `Everyone` read access and `Analysts` full control.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-User</command:name> <maml:description> <maml:para>Installs a *local* user account.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>User</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Creates a new *local* user account. If the account already exists, updates it. Returns the user.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-User</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Username</maml:name> <maml:description> <maml:para>The username for the user.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Password</maml:name> <maml:description> <maml:para>The user's password.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Description</maml:name> <maml:description> <maml:para>A description of the user.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>FullName</maml:name> <maml:description> <maml:para>The full name of the user.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UserCannotChangePassword</maml:name> <maml:description> <maml:para>Prevent the user from changing his password.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PasswordNeverExpires</maml:name> <maml:description> <maml:para>Set to true if the user's password should expire.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Username</maml:name> <maml:description> <maml:para>The username for the user.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Password</maml:name> <maml:description> <maml:para>The user's password.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Description</maml:name> <maml:description> <maml:para>A description of the user.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>FullName</maml:name> <maml:description> <maml:para>The full name of the user.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UserCannotChangePassword</maml:name> <maml:description> <maml:para>Prevent the user from changing his password.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PasswordNeverExpires</maml:name> <maml:description> <maml:para>Set to true if the user's password should expire.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.DirectoryServices.AccountManagement.UserPrincipal</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-User -Username LSkywalker -Password "whydidn'tyoutellme" -Description "Luke Skywalker's account."</dev:code> <dev:remarks> <maml:para>Creates a new `LSkywalker` user account with the given password and description. Luke's password is set ot never expire.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-User -Username LSkywalker -Password "whydidn'tyoutellme" -UserCannotChangePassword -PasswordNeverExpires</dev:code> <dev:remarks> <maml:para>Demonstrates how to create an account for a user who cannot change his password and whose password never expires.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-User</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-User</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Uninstall-User</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Install-WindowsFeature</command:name> <maml:description> <maml:para>Installs an optional Windows component/feature.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Install</command:verb> <command:noun>WindowsFeature</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>This function will install Windows features. Note that the name of these features can differ between different versions of Windows. Use `Get-WindowsFeature` to get the list of features on your operating system. **This function is not available on Windows 8/2012.**</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Install-WindowsFeature</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The components to enable/install. Feature names are case-sensitive.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Install-WindowsFeature</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Iis</maml:name> <maml:description> <maml:para>Installs IIS.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IisHttpRedirection</maml:name> <maml:description> <maml:para>Installs IIS's HTTP redirection feature.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Msmq</maml:name> <maml:description> <maml:para>Installs MSMQ.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MsmqHttpSupport</maml:name> <maml:description> <maml:para>Installs MSMQ HTTP support.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MsmqActiveDirectoryIntegration</maml:name> <maml:description> <maml:para>Installs MSMQ Active Directory Integration.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The components to enable/install. Feature names are case-sensitive.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Iis</maml:name> <maml:description> <maml:para>Installs IIS.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IisHttpRedirection</maml:name> <maml:description> <maml:para>Installs IIS's HTTP redirection feature.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Msmq</maml:name> <maml:description> <maml:para>Installs MSMQ.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MsmqHttpSupport</maml:name> <maml:description> <maml:para>Installs MSMQ HTTP support.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MsmqActiveDirectoryIntegration</maml:name> <maml:description> <maml:para>Installs MSMQ Active Directory Integration.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-WindowsFeature -Name TelnetClient</dev:code> <dev:remarks> <maml:para>Installs Telnet.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-WindowsFeature -Name TelnetClient,TFTP</dev:code> <dev:remarks> <maml:para>Installs Telnet and TFTP</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Install-WindowsFeature -Iis</dev:code> <dev:remarks> <maml:para>Installs IIS.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-WindowsFeature</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-WindowsFeature</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Uninstall-WindowsFeature</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Invoke-AppCmd</command:name> <maml:description> <maml:para>Invokes appcmd.exe, the IIS command line configuration utility.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Invoke</command:verb> <command:noun>AppCmd</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Runs appcmd.exe, passing all the arguments that get passed to `Invoke-AppCmd`.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Invoke-AppCmd</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>AppCmdArgs</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Object</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>AppCmdArgs</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Object</command:parameterValue> <dev:type> <maml:name>Object</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Invoke-AppCmd list site Peanuts</dev:code> <dev:remarks> <maml:para>Runs `appcmd.exe list site Peanuts`, which will list the configuration for the Peanuts website.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Invoke-PowerShell</command:name> <maml:description> <maml:para>Invokes a script block in a separate powershell.exe process.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Invoke</command:verb> <command:noun>PowerShell</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>If using PowerShell v2.0, the invoked PowerShell process can run under the .NET 4.0 CLR (using `v4.0` as the value to the Runtime parameter). If using PowerShell v3.0, you can *only* run script blocks under a `v4.0` CLR. PowerShell converts script blocks to an encoded command, and when running encoded commands, PowerShell doesn't allow the `-Version` parameter for running PowerShell under a different version. To run code under a .NET 2.0 CLR from PowerShell 3, use the `FilePath` parameter to run a specfic script. This function launches a PowerShell process that matches the architecture of the *operating system*. On 64-bit operating systems, you can run under 32-bit PowerShell by specifying the `x86` switch). PowerShell's execution policy has to be set seperately in all architectures (i.e. x86 and x64), so you may get an error message about script being disabled. Use the `-ExecutionPolicy` parameter to set a temporary execution policy when running a script.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Invoke-PowerShell</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ScriptBlock</maml:name> <maml:description> <maml:para>The command to run.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ArgumentList</maml:name> <maml:description> <maml:para>Any arguments to pass to the command/scripts.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Object[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OutputFormat</maml:name> <maml:description> <maml:para>Determines how output from the PowerShel command is formatted</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>x86</maml:name> <maml:description> <maml:para>Run the x86 (32-bit) version of PowerShell, otherwise the version which matches the OS architecture is run, *regardless of the architecture of the currently running process*.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Runtime</maml:name> <maml:description> <maml:para>The CLR to use. Must be one of `v2.0` or `v4.0`. Default is the current PowerShell runtime.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Invoke-PowerShell</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilePath</maml:name> <maml:description> <maml:para>The script to run.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ArgumentList</maml:name> <maml:description> <maml:para>Any arguments to pass to the command/scripts.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Object[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OutputFormat</maml:name> <maml:description> <maml:para>Determines how output from the PowerShel command is formatted</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ExecutionPolicy</maml:name> <maml:description> <maml:para>The execution policy to use when running a script. By default, execution policies are set to `Restricted`. If running an architecture of PowerShell whose execution policy isn't set, `Invoke-PowerShell` will fail.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">ExecutionPolicy</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>x86</maml:name> <maml:description> <maml:para>Run the x86 (32-bit) version of PowerShell, otherwise the version which matches the OS architecture is run, *regardless of the architecture of the currently running process*.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Runtime</maml:name> <maml:description> <maml:para>The CLR to use. Must be one of `v2.0` or `v4.0`. Default is the current PowerShell runtime.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ScriptBlock</maml:name> <maml:description> <maml:para>The command to run.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue> <dev:type> <maml:name>ScriptBlock</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ArgumentList</maml:name> <maml:description> <maml:para>Any arguments to pass to the command/scripts.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Object[]</command:parameterValue> <dev:type> <maml:name>Object[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>OutputFormat</maml:name> <maml:description> <maml:para>Determines how output from the PowerShel command is formatted</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>x86</maml:name> <maml:description> <maml:para>Run the x86 (32-bit) version of PowerShell, otherwise the version which matches the OS architecture is run, *regardless of the architecture of the currently running process*.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Runtime</maml:name> <maml:description> <maml:para>The CLR to use. Must be one of `v2.0` or `v4.0`. Default is the current PowerShell runtime.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FilePath</maml:name> <maml:description> <maml:para>The script to run.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ExecutionPolicy</maml:name> <maml:description> <maml:para>The execution policy to use when running a script. By default, execution policies are set to `Restricted`. If running an architecture of PowerShell whose execution policy isn't set, `Invoke-PowerShell` will fail.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">ExecutionPolicy</command:parameterValue> <dev:type> <maml:name>ExecutionPolicy</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Invoke-PowerShell -Command { $PSVersionTable }</dev:code> <dev:remarks> <maml:para>Runs a separate PowerShell process which matches the architecture of the operating system, returning the $PSVersionTable from that process. This will fail under 32-bit PowerShell on a 64-bit operating system.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Invoke-PowerShell -Command { $PSVersionTable } -x86</dev:code> <dev:remarks> <maml:para>Runs a 32-bit PowerShell process, return the $PSVersionTable from that process.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Invoke-PowerShell -Command { $PSVersionTable } -Runtime v4.0</dev:code> <dev:remarks> <maml:para>Runs a separate PowerShell process under the v4.0 .NET CLR, returning the $PSVersionTable from that process. Should return a CLRVersion of `4.0`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Invoke-PowerShell -FilePath C:\Projects\Carbon\bin\Set-DotNetConnectionString.ps1 -ArgumentList '-Name','myConn','-Value',"'data source=.\DevDB;Integrated Security=SSPI;'"</dev:code> <dev:remarks> <maml:para>Runs the `Set-DotNetConnectionString.ps1` script with `ArgumentList` as arguments/parameters. Note that you have to double-quote any arguments with spaces. Otherwise, the argument gets interpreted as multiple arguments.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Invoke-PowerShell -FilePath Get-PsVersionTable.ps1 -x86 -ExecutionPolicy RemoteSigned</dev:code> <dev:remarks> <maml:para>Shows how to run powershell.exe with a custom executin policy, in case the running of scripts is disabled.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Invoke-WindowsInstaller</command:name> <maml:description> <maml:para>Runs an MSI installer.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Invoke</command:verb> <command:noun>WindowsInstaller</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>There are two problems running an MSI (for MicroSoft Installer): * The installer runs asynchronously, which means running/invoking it returns immediately, with no notification about whether it succeeded or failed. * A UI is shown. This function will run an MSI installer and wait for the MSI to finish. If the install process returns a non-zero exit code, an error will be written. You can optionally run the installer in quiet mode. This hides any installer UI and installs the package with the default options.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Invoke-WindowsInstaller</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The installer to run.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>Runs the installer in quiet mode.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The installer to run.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>Runs the installer in quiet mode.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Invoke-WindowsInstaller -Path Path\to\installer.msi</dev:code> <dev:remarks> <maml:para>Runs installer.msi, and waits untils for the installer to finish. If the installer has a UI, it is shown to the user.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Invoke-WindowsInstaller -Path Path\to\installer.msi -Quiet</dev:code> <dev:remarks> <maml:para>Runs installer.msi without showing its UI (i.e. performs a silent install using the package's default options).</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Join-IisVirtualPath</command:name> <maml:description> <maml:para>Combines a path and a child path for an IIS website, application, virtual directory into a single path.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Join</command:verb> <command:noun>IisVirtualPath</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Removes extra slashes. Converts backward slashes to forward slashes. Relative portions are not removed. Sorry.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Join-IisVirtualPath</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The parent path.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>ChildPath</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The parent path.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>ChildPath</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Join-IisVirtualPath 'SiteName' 'Virtual/Path'</dev:code> <dev:remarks> <maml:para>Demonstrates how to join two IIS paths together. REturns `SiteName/Virtual/Path`.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Lock-IisConfigurationSection</command:name> <maml:description> <maml:para>Locks an IIS configuration section so that it can't be modified/overridden by individual websites.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Lock</command:verb> <command:noun>IisConfigurationSection</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Locks configuration sections globally so they can't be modified by individual websites. For a list of section paths, run C:\Windows\System32\inetsrv\appcmd.exe lock config /section:?</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Lock-IisConfigurationSection</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SectionPath</maml:name> <maml:description> <maml:para>The path to the section to lock. For a list of sections, run C:\Windows\System32\inetsrv\appcmd.exe unlock config /section:?</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SectionPath</maml:name> <maml:description> <maml:para>The path to the section to lock. For a list of sections, run C:\Windows\System32\inetsrv\appcmd.exe unlock config /section:?</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Lock-IisConfigurationSection -SectionPath 'system.webServer/security/authentication/basicAuthentication'</dev:code> <dev:remarks> <maml:para>Locks the `basicAuthentication` configuration so that sites can't override/modify those settings.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>New-Credential</command:name> <maml:description> <maml:para>Creates a new `PSCredential` object from a given username and password.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>New</command:verb> <command:noun>Credential</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Many PowerShell commands require a `PSCredential` object instead of username/password. This function will create one for you.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>New-Credential</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>User</maml:name> <maml:description> <maml:para>The username.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>User</maml:name> <maml:description> <maml:para>The username.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCredential</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>New-Credential -User ENTERPRISE\picard -Password 'earlgrey'</dev:code> <dev:remarks> <maml:para>Creates a new credential object for Captain Picard.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>New-Junction</command:name> <maml:description> <maml:para>Creates a new junction.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>New</command:verb> <command:noun>Junction</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Creates a junction given by `-Link` which points to the path given by `-Target`. If something already exists at `Link`, an error is written. Returns a `System.IO.DirectoryInfo` object for the junction, if one is created.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>New-Junction</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Link</maml:name> <maml:description> <maml:para>The new junction to create</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Target</maml:name> <maml:description> <maml:para>The target of the junction, i.e. where the junction will point to</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Link</maml:name> <maml:description> <maml:para>The new junction to create</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Target</maml:name> <maml:description> <maml:para>The target of the junction, i.e. where the junction will point to</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>New-Junction -Link 'C:\Windows\system32Link' -Target 'C:\Windows\system32'</dev:code> <dev:remarks> <maml:para>Creates the `C:\Windows\system32Link` directory, which points to `C:\Windows\system32`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Install-Junction</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Remove-Junction</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>New-RsaKeyPair</command:name> <maml:description> <maml:para>Generates a public/private RSA key pair.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>New</command:verb> <command:noun>RsaKeyPair</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses the `makecert.exe` and `pvk2pfx.exe` programs to generate a public/private RSA key pair, and saves each to files of your choosing. The public key is saved as an X509Certificate. The private key is saved as a PFX file. Both can be loaded by .NET's `X509Certificate` class. Returns `System.IO.FileInfo` objects for the public and private key, in that order. You will be prompted for the private key password. Once when creating the private key, once to save it to a file, and finally to export it to a PFX file. Sorry about that: the `makecert.exe` tool doesn't have an password command-line parameter. The first two prompts will be GUIs, so you can't run this command headless. To create a password-less private key, click "None" when prompted for the private key password, and leave the other password prompts blank. `makecert.exe` and `pvk2pfx.exe` are part of the Windows SDK. They can be downloaded from the following locations: * [Windows 7](http://www.microsoft.com/en-us/download/details.aspx?id=8279) * [Windows 8](http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx) * [Windows 8.1](http://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx)</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>New-RsaKeyPair</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Subject</maml:name> <maml:description> <maml:para>The key's subject. Should be of the form `CN=Name,OU=Name,O=SuperMagicFunTime,ST=OR,C=US`. Only the `CN=Name` part is required.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Algorithm</maml:name> <maml:description> <maml:para>The signature algorithm. Default is `sha512`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ValidFrom</maml:name> <maml:description> <maml:para>The date/time the keys will become valid. Default is now.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ValidTo</maml:name> <maml:description> <maml:para>The date/time the keys should expire. Default is `DateTime::MaxValue`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Length</maml:name> <maml:description> <maml:para>The length, in bits, of the generated key length. Default is `4096`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Authority</maml:name> <maml:description> <maml:para>The signing authority of the certificate. Must be `commercial` (for certificates used by commercial software publishers) or `individual`, for certificates used by individual software publishers. Default is `individual`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>PublicKeyFile</maml:name> <maml:description> <maml:para>The file where the public key should be stored. Saved as an X509 certificate.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>PrivateKeyFile</maml:name> <maml:description> <maml:para>The file where the private key should be stored. The private key will be saved as an X509 certificate in PFX format and will include the public key.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Overwrites `PublicKeyFile` and/or `PrivateKeyFile`, if they exist.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Subject</maml:name> <maml:description> <maml:para>The key's subject. Should be of the form `CN=Name,OU=Name,O=SuperMagicFunTime,ST=OR,C=US`. Only the `CN=Name` part is required.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Algorithm</maml:name> <maml:description> <maml:para>The signature algorithm. Default is `sha512`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ValidFrom</maml:name> <maml:description> <maml:para>The date/time the keys will become valid. Default is now.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> <dev:type> <maml:name>DateTime</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ValidTo</maml:name> <maml:description> <maml:para>The date/time the keys should expire. Default is `DateTime::MaxValue`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">DateTime</command:parameterValue> <dev:type> <maml:name>DateTime</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Length</maml:name> <maml:description> <maml:para>The length, in bits, of the generated key length. Default is `4096`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Authority</maml:name> <maml:description> <maml:para>The signing authority of the certificate. Must be `commercial` (for certificates used by commercial software publishers) or `individual`, for certificates used by individual software publishers. Default is `individual`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>PublicKeyFile</maml:name> <maml:description> <maml:para>The file where the public key should be stored. Saved as an X509 certificate.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>PrivateKeyFile</maml:name> <maml:description> <maml:para>The file where the private key should be stored. The private key will be saved as an X509 certificate in PFX format and will include the public key.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Overwrites `PublicKeyFile` and/or `PrivateKeyFile`, if they exist.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.IO.FileInfo</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>New-RsaKeyPair -Subject 'CN=MyName' -PublicKeyFile 'MyName.cer' -PrivateKeyFile 'MyName.pfx'</dev:code> <dev:remarks> <maml:para>Demonstrates the minimal parameters needed to generate a key pair. The key will use a sha512 signing algorithm, have a length of 4096 bits, expire on `DateTime::MaxValue`, as an `individual` authority. The public key will be saved in the current directory as `MyName.cer`. The private key will be saved to the current directory as `MyName.pfx`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>New-RsaKeyPair -Subject 'CN=MyName' -PublicKeyFile 'MyName.cer' -PrivateKeyFile 'MyName.pfx' -Algorithm 'sha1' -ValidFrom (Get-Date -Year 2015 -Month 1 -Day 1) -ValidTo (Get-Date -Year 2015 -Month 12 -Day 31) -Length 1024 -Authority 'commercial'</dev:code> <dev:remarks> <maml:para>Demonstrates how to use all the parameters to create a truly customized key pair. The generated certificate will use the sha1 signing algorithm, becomes effective 1/1/2015, expires 12/31/2015, is 1024 bits in length, as specifies `commercial` as the signing authority.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://www.microsoft.com/en-us/download/details.aspx?id=8279</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>New-TempDirectory</command:name> <maml:description> <maml:para>Creates a new temporary directory with a random name.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>New</command:verb> <command:noun>TempDirectory</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>A new temporary directory is created in the current user's `env:TEMP` directory. The directory's name is created using the `Path` class's [GetRandomFileName method](http://msdn.microsoft.com/en-us/library/system.io.pat h.getrandomfilename.aspx). To add a custom prefix to the directory name, use the `Prefix` parameter. If you pass in a path, only its name will be used. In this way, you can pass `$MyInvocation.MyCommand.Definition` (PowerShell 2) or `$PSCommandPath` (PowerShell 3+), which will help you identify what scripts are leaving cruft around in the temp directory.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>New-TempDirectory</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Prefix</maml:name> <maml:description> <maml:para>A prefix to use, so you can more easily identify *what* created the temporary directory. If you pass in a path, it will be converted to a file name.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Prefix</maml:name> <maml:description> <maml:para>A prefix to use, so you can more easily identify *what* created the temporary directory. If you pass in a path, it will be converted to a file name.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.IO.DirectoryInfo</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>New-TempDirectory</dev:code> <dev:remarks> <maml:para>Demonstrates how to create a new temporary directory, e.g. `C:\Users\ajensen\AppData\Local\Temp\5pobd3tu.5rn`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>New-TempDirectory -Prefix 'Carbon'</dev:code> <dev:remarks> <maml:para>Demonstrates how to create a new temporary directory with a custom prefix for its name, e.g. `C:\Users\ajensen\AppData\Local\Temp\Carbon5pobd3tu.5rn`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>New-TempDirectory -Prefix $MyInvocation.MyCommand.Definition</dev:code> <dev:remarks> <maml:para>Demonstrates how you can use `$MyInvocation.MyCommand.Definition` in PowerShell 2 to create a new, temporary directory, named after the currently executing scripts, e.g. `C:\Users\ajensen\AppData\Local\Temp\New-TempDirectory.ps15pobd3tu.5rn`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>New-TempDirectory -Prefix $PSCommandPath</dev:code> <dev:remarks> <maml:para>Demonstrates how you can use `$PSCommandPath` in PowerShell 3+ to create a new, temporary directory, named after the currently executing scripts, e.g. `C:\Users\ajensen\AppData\Local\Temp\New-TempDirectory.ps15pobd3tu.5rn`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.io.path.getrandomfilename.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Protect-Acl</command:name> <maml:description> <maml:para>Protects an ACL so that changes to its parent can't be inherited to it.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Protect</command:verb> <command:noun>Acl</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>New items in the registry or file system will usually inherit ACLs from its parent. This function stops an item from inheriting rules from its, and will optionally preserve the existing inherited rules. Any existing, non-inherited access rules are left in place.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Protect-Acl</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The file system or registry path whose</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Preserve</maml:name> <maml:description> <maml:para>Keep the inherited access rules on this item.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The file system or registry path whose</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Preserve</maml:name> <maml:description> <maml:para>Keep the inherited access rules on this item.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <!-- Inputs--> <command:inputType> <dev:type> <maml:name>System.String</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Protect-Acl -Path C:\Projects\Carbon</dev:code> <dev:remarks> <maml:para>Removes all inherited access rules from the `C:\Projects\Carbon` directory. Non-inherited rules are preserved.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Protect-Acl -Path hklm:\Software\Carbon -Preserve</dev:code> <dev:remarks> <maml:para>Stops `HKLM:\Software\Carbon` from inheriting acces rules from its parent, but preserves the existing, inheritied access rules.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Grant-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Protect-String</command:name> <maml:description> <maml:para>Encrypts a string.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Protect</command:verb> <command:noun>String</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Strings can be encrypted with the Data Protection API (DPAPI) or RSA. ## DPAPI The DPAPI hides the encryptiong/decryption keys from you. As such, anything encrpted with via DPAPI can only be decrypted on the same computer it was encrypted on. Use the `ForUser` switch so that only the user who encrypted can decrypt. Use the `ForComputer` switch so that any user who can log into the computer can decrypt. To encrypt as a specific user on the local computer, pass that user's credentials with the `Credential` parameter. (Note this method doesn't work over PowerShell remoting.) ## RSA RSA is an assymetric encryption/decryption algorithm, which requires a public/private key pair. The secret is encrypted with the public key, and can only be decrypted with the corresponding private key. The secret being encrypted can't be larger than the RSA key pair's size/length, usually 1024, 2048, or 4096 bits (128, 256, and 512 bytes, respectively). You can specify the public key in three ways: * with a `System.Security.Cryptography.X509Certificates.X509Certificate2` object, via the `Certificate` parameter * with a certificate in one of the Windows certificate stores, passing its unique thumbprint via the `Thumbprint` parameter, or via the `PublicKeyPath` parameter cn be certificat provider path, e.g. it starts with `cert:\`. * with a X509 certificate file, via the `PublicKeyPath` parameter</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Protect-String</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>String</maml:name> <maml:description> <maml:para>The text to encrypt.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForUser</maml:name> <maml:description> <maml:para>Encrypts for the current user so that only he can decrypt.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Protect-String</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>String</maml:name> <maml:description> <maml:para>The text to encrypt.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForComputer</maml:name> <maml:description> <maml:para>Encrypts for the current computer so that any user logged into the computer can decrypt.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Protect-String</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>String</maml:name> <maml:description> <maml:para>The text to encrypt.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Credential</maml:name> <maml:description> <maml:para>Encrypts for a specific user.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Protect-String</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>String</maml:name> <maml:description> <maml:para>The text to encrypt.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Certificate</maml:name> <maml:description> <maml:para>The public key to use for encrypting.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">X509Certificate2</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UseDirectEncryptionPadding</maml:name> <maml:description> <maml:para>If true, uses Direct Encryption (PKCS#1 v1.5) padding. Otherwise (the default), uses OAEP (PKCS#1 v2) padding. See [Encrypt](http://msdn.microsoft.com/en-us/lib rary/system.security.cryptography.rsacryptoserviceprovider.encrypt(v=vs.110).asp x) for information.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Protect-String</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>String</maml:name> <maml:description> <maml:para>The text to encrypt.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Thumbprint</maml:name> <maml:description> <maml:para>The thumbprint of the certificate, found in one of the Windows certificate stores, to use when encrypting. All certificate stores are searched.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UseDirectEncryptionPadding</maml:name> <maml:description> <maml:para>If true, uses Direct Encryption (PKCS#1 v1.5) padding. Otherwise (the default), uses OAEP (PKCS#1 v2) padding. See [Encrypt](http://msdn.microsoft.com/en-us/lib rary/system.security.cryptography.rsacryptoserviceprovider.encrypt(v=vs.110).asp x) for information.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Protect-String</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>String</maml:name> <maml:description> <maml:para>The text to encrypt.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PublicKeyPath</maml:name> <maml:description> <maml:para>The path to the public key to use for encrypting. Must be to an `X509Certificate2` object.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UseDirectEncryptionPadding</maml:name> <maml:description> <maml:para>If true, uses Direct Encryption (PKCS#1 v1.5) padding. Otherwise (the default), uses OAEP (PKCS#1 v2) padding. See [Encrypt](http://msdn.microsoft.com/en-us/lib rary/system.security.cryptography.rsacryptoserviceprovider.encrypt(v=vs.110).asp x) for information.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>String</maml:name> <maml:description> <maml:para>The text to encrypt.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForUser</maml:name> <maml:description> <maml:para>Encrypts for the current user so that only he can decrypt.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForComputer</maml:name> <maml:description> <maml:para>Encrypts for the current computer so that any user logged into the computer can decrypt.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Credential</maml:name> <maml:description> <maml:para>Encrypts for a specific user.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Certificate</maml:name> <maml:description> <maml:para>The public key to use for encrypting.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">X509Certificate2</command:parameterValue> <dev:type> <maml:name>X509Certificate2</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UseDirectEncryptionPadding</maml:name> <maml:description> <maml:para>If true, uses Direct Encryption (PKCS#1 v1.5) padding. Otherwise (the default), uses OAEP (PKCS#1 v2) padding. See [Encrypt](http://msdn.microsoft.com/en-us/lib rary/system.security.cryptography.rsacryptoserviceprovider.encrypt(v=vs.110).asp x) for information.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Thumbprint</maml:name> <maml:description> <maml:para>The thumbprint of the certificate, found in one of the Windows certificate stores, to use when encrypting. All certificate stores are searched.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PublicKeyPath</maml:name> <maml:description> <maml:para>The path to the public key to use for encrypting. Must be to an `X509Certificate2` object.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <!-- Inputs--> <command:inputType> <dev:type> <maml:name>System.String</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Protect-String -String 'TheStringIWantToEncrypt' -ForUser | Out-File MySecret.txt</dev:code> <dev:remarks> <maml:para>Encrypts the given string and saves the encrypted string into MySecret.txt. Only the user who encrypts the string can unencrypt it.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>$cipherText = Protect-String -String "MySuperSecretIdentity" -ForComputer</dev:code> <dev:remarks> <maml:para>Encrypts the given string and stores the value in $cipherText. Because the encryption scope is set to LocalMachine, any user logged onto the local computer can decrypt `$cipherText`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Protect-String -String 's0000p33333r s33333cr33333t' -Credential (Get-Credential 'builduser')</dev:code> <dev:remarks> <maml:para>Demonstrates how to use `Protect-String` to encrypt a secret as a specific user. This is useful for situation where a secret needs to be encrypted by a user other than the user running `Protect-String`. Encrypting as a specific user won't work over PowerShell remoting.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Protect-String -String 'the secret sauce' -Certificate $myCert</dev:code> <dev:remarks> <maml:para>Demonstrates how to encrypt a secret using RSA with a `System.Security.Cryptography.X509Certificates.X509Certificate2` object. You're responsible for creating/loading it. The `New-RsaKeyPair` function will create a key pair for you, if you've got a Windows SDK installed.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Protect-String -String 'the secret sauce' -Thumbprint '44A7C27F3353BC53F82318C14490D7E2500B6D9E'</dev:code> <dev:remarks> <maml:para>Demonstrates how to encrypt a secret using RSA with a certificate in one of the Windows certificate stores. All local machine and user stores are searched.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 6 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>ProtectString -String 'the secret sauce' -PublicKeyPath 'C:\Projects\Security\publickey.cer'</dev:code> <dev:remarks> <maml:para>Demonstrates how to encrypt a secret using RSA with a certificate file. The file must be loadable by the `System.Security.Cryptography.X509Certificates.X509Certificate` class.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 7 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>ProtectString -String 'the secret sauce' -PublicKeyPath 'cert:\LocalMachine\My\44A7C27F3353BC53F82318C14490D7E2500B6D9E'</dev:code> <dev:remarks> <maml:para>Demonstrates how to encrypt a secret using RSA with a certificate in the store, giving its exact path.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>New-RsaKeyPair</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Unprotect-String</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.security.cryptography.protecteddata.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Remove-EnvironmentVariable</command:name> <maml:description> <maml:para>Removes an environment variable.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Remove</command:verb> <command:noun>EnvironmentVariable</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses the .NET [Environment class](http://msdn.microsoft.com/en-us/library/z8te35sa) to remove an environment variable from the Process, User, or Computer scopes. Changes to environment variables in the User and Machine scope are not picked up by running processes. Any running processes that use this environment variable should be restarted.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Remove-EnvironmentVariable</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The environment variable to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForProcess</maml:name> <maml:description> <maml:para>Removes the environment variable for the current process.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Remove-EnvironmentVariable</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The environment variable to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForUser</maml:name> <maml:description> <maml:para>Removes the environment variable for the current user.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Remove-EnvironmentVariable</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The environment variable to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForComputer</maml:name> <maml:description> <maml:para>Removes the environment variable for the current computer.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The environment variable to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForProcess</maml:name> <maml:description> <maml:para>Removes the environment variable for the current process.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForUser</maml:name> <maml:description> <maml:para>Removes the environment variable for the current user.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForComputer</maml:name> <maml:description> <maml:para>Removes the environment variable for the current computer.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Remove-EnvironmentVariable -Name 'MyEnvironmentVariable' -ForProcess</dev:code> <dev:remarks> <maml:para>Removes the `MyEnvironmentVariable` from the process scope.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Carbon_EnvironmentVariable</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Set-EnvironmentVariable</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/z8te35sa</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Remove-GroupMember</command:name> <maml:description> <maml:para>Removes users or groups from a *local* group.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Remove</command:verb> <command:noun>GroupMember</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>You would think it's pretty easy and straight-forward to remove users/groups from a local group, but you would be wrong. The quick solution is to use `net localgroup`, but that won't accept user/group names longer than 24 characters. This means you have to use the .NET Directory Services APIs. How do you reliably remove both users *and* groups? What if those users are in a domain? What if they're in another domain? What about built-in users? Fortunately, your brain hasn't exploded. So, this function removes users or groups from a *local* group. If the user or group is not a member, nothing happens.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Remove-GroupMember</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The group name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Member</maml:name> <maml:description> <maml:para>The users/groups to remove from a group.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The group name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Member</maml:name> <maml:description> <maml:para>The users/groups to remove from a group.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Remove-GroupMember -Name Administrators -Member EMPIRE\DarthVader,EMPIRE\EmperorPalpatine,REBELS\LSkywalker</dev:code> <dev:remarks> <maml:para>Removes Darth Vader, Emperor Palpatine and Luke Skywalker from the local administrators group.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Remove-GroupMember -Name TieFighters -Member NetworkService</dev:code> <dev:remarks> <maml:para>Removes the local NetworkService account from the local TieFighters group.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Remove-HostsEntry</command:name> <maml:description> <maml:para>Removes entries from the hosts file by hostname.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Remove</command:verb> <command:noun>HostsEntry</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>You can remove multiple entries or pipe entries into this function.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Remove-HostsEntry</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>HostName</maml:name> <maml:description> <maml:para>The hostname of the hosts entry/entries to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The hosts file to modify. Defaults to the Windows hosts file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>HostName</maml:name> <maml:description> <maml:para>The hostname of the hosts entry/entries to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The hosts file to modify. Defaults to the Windows hosts file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <!-- Inputs--> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Remove-HostsEntry -HostName 'adadvisor.net'</dev:code> <dev:remarks> <maml:para>Demonstrates how to remove hosts entry for `adadvisor.net`, which you probably don't want to do.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Remove-HostsEntry -HostName 'adadvisor.net','www.adchimp.com'</dev:code> <dev:remarks> <maml:para>Demonstrates how to remove multiple hosts entries.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>('adadvisor.net','www.adchimp.com') | Remove-HostsEntry</dev:code> <dev:remarks> <maml:para>Demonstrates how to pipe hostnames into `Remove-HostsEntry`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Remove-HostsEntry -HostName 'adadvisor.net' -Path 'C:\Projects\Carbon\adblockhosts'</dev:code> <dev:remarks> <maml:para>Demonstrates how to work with a file other than Windows' default hosts file.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Remove-IisMimeMap</command:name> <maml:description> <maml:para>Removes a file extension to MIME type map from an entire web server.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Remove</command:verb> <command:noun>IisMimeMap</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>IIS won't serve static files unless they have an entry in the MIME map. Use this function toremvoe an existing MIME map entry. If one doesn't exist, nothing happens. Not even an error. If a specific website has the file extension in its MIME map, that site will continue to serve files with those extensions.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Remove-IisMimeMap</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FileExtension</maml:name> <maml:description> <maml:para>The file extension whose MIME map to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Remove-IisMimeMap</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the website whose MIME type to set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional site path whose configuration should be returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FileExtension</maml:name> <maml:description> <maml:para>The file extension whose MIME map to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FileExtension</maml:name> <maml:description> <maml:para>The file extension whose MIME map to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the website whose MIME type to set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional site path whose configuration should be returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Remove-IisMimeMap -FileExtension '.m4v' -MimeType 'video/x-m4v'</dev:code> <dev:remarks> <maml:para>Removes the `.m4v` file extension so that IIS will no longer serve those files.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-IisMimeMap</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Set-IisMimeMap</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Remove-IniEntry</command:name> <maml:description> <maml:para>Removes an entry/line/setting from an INI file.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Remove</command:verb> <command:noun>IniEntry</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>A configuration file consists of sections, led by a `[section]` header and followed by `name = value` entries. This function removes an entry in an INI file. Something like this: [ui] username = Regina Spektor <regina@reginaspektor.com> [extensions] share = extdiff = Names are not allowed to contains the equal sign, `=`. Values can contain any character. The INI file is parsed using `Split-Ini`. [See its documentation for more examples.](Split-Ini.html) If the entry doesn't exist, does nothing. Be default, operates on the INI file case-insensitively. If your INI is case-sensitive, use the `-CaseSensitive` switch.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Remove-IniEntry</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the INI file.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the INI entry to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Section</maml:name> <maml:description> <maml:para>The section of the INI where the entry should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CaseSensitive</maml:name> <maml:description> <maml:para>Removes INI entries in a case-sensitive manner.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the INI file.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the INI entry to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Section</maml:name> <maml:description> <maml:para>The section of the INI where the entry should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CaseSensitive</maml:name> <maml:description> <maml:para>Removes INI entries in a case-sensitive manner.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Remove-IniEntry -Path C:\Projects\Carbon\StupidStupid.ini -Section rat -Name tails</dev:code> <dev:remarks> <maml:para>Removes the `tails` item in the `[rat]` section of the `C:\Projects\Carbon\StupidStupid.ini` file.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Remove-IniEntry -Path C:\Users\me\npmrc -Name 'prefix' -CaseSensitive</dev:code> <dev:remarks> <maml:para>Demonstrates how to remove an INI entry in an INI file that is case-sensitive.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Set-IniEntry</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Split-Ini</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Remove-Junction</command:name> <maml:description> <maml:para>Removes a junction.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Remove</command:verb> <command:noun>Junction</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Safely removes a junction without removing the junction's target. If you try to remove something that isn't a junction, an error will be written. Use `Test-PathIsJunction` or the `IsJunction` extended method on `DirectoryInfo` object.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Remove-Junction</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the junction to remove.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the junction to remove.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Remove-Junction -Path 'C:\I\Am\A\Junction'</dev:code> <dev:remarks> <maml:para>Removes the `C:\I\Am\A\Junction`</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Install-Junction</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-Junction</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-PathIsJunction</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Remove-RegistryKeyValue</command:name> <maml:description> <maml:para>Removes a value from a registry key, if it exists.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Remove</command:verb> <command:noun>RegistryKeyValue</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>If the given key doesn't exist, nothing happens.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Remove-RegistryKeyValue</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the registry key where the value should be removed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the value to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the registry key where the value should be removed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the value to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Remove-RegistryKeyValue -Path hklm:\Software\Carbon\Test -Name 'InstallPath'</dev:code> <dev:remarks> <maml:para>Removes the `InstallPath` value from the `hklm:\Software\Carbon\Test` registry key.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Remove-SslCertificateBinding</command:name> <maml:description> <maml:para>Removes an SSL certificate binding.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Remove</command:verb> <command:noun>SslCertificateBinding</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses the netsh command line application to remove an SSL certificate binding for an IP/port combination. If the binding doesn't exist, nothing is changed.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Remove-SslCertificateBinding</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>IPAddress</maml:name> <maml:description> <maml:para>The IP address whose binding to remove. Default is all IP addresses.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">IPAddress</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Port</maml:name> <maml:description> <maml:para>The port of the binding to remove. Default is port 443.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">UInt16</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>IPAddress</maml:name> <maml:description> <maml:para>The IP address whose binding to remove. Default is all IP addresses.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">IPAddress</command:parameterValue> <dev:type> <maml:name>IPAddress</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Port</maml:name> <maml:description> <maml:para>The port of the binding to remove. Default is port 443.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">UInt16</command:parameterValue> <dev:type> <maml:name>UInt16</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>></maml:para> </maml:introduction> <dev:code>Remove-SslCertificateBinding -IPAddress '45.72.89.57' -Port 443</dev:code> <dev:remarks> <maml:para>Removes the SSL certificate bound to IP 45.72.89.57 on port 443.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>></maml:para> </maml:introduction> <dev:code>Remove-SslCertificateBinding</dev:code> <dev:remarks> <maml:para>Removes the default SSL certificate from port 443. The default certificate is bound to all IP addresses.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Reset-HostsFile</command:name> <maml:description> <maml:para>Removes all custom host entries from this computer's hosts file.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Reset</command:verb> <command:noun>HostsFile</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Sometimes you want to start over. This method removes all hosts entries from your hosts file after the default localhost entry. By default, the current computer's hosts file is reset. You can operate on a custom hosts file by passing its path to the `Path` argument.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Reset-HostsFile</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the hosts file to modify. Defaults to the local computer's hosts file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the hosts file to modify. Defaults to the local computer's hosts file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Reset-HostsFile</dev:code> <dev:remarks> <maml:para>If your hosts file contains something like this: 127.0.0.1 localhost 10.1.2.3 myserver 10.5.6.7 myserver2 After calling `Reset-HostsFile`, your hosts will contain: 127.0.0.1 localhost</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Reset-HostsFile -Path my\custom\hosts</dev:code> <dev:remarks> <maml:para>Resets the hosts file at `my\custom\hosts`.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Reset-MsmqQueueManagerID</command:name> <maml:description> <maml:para>Resets the MSMQ Queue Manager ID.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Reset</command:verb> <command:noun>MsmqQueueManagerID</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Removes any existing MSMQ Queue Manager ID in the registry and restarts MSMQ so that it will generate a fresh QM ID. Each instance of MSMQ should have its own unique Queue Manager ID. If multiple machines have the same Queue Manager ID, destination queues think messages are actually coming from the same computer, and messages are lost/dropped. If you clone new servers from a template or from old servers, you'll get duplicate Queue Manager IDs. This function causes MSMQ to reset its Queue Manager ID.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Reset-MsmqQueueManagerID</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Reset-MsmqQueueManagerId</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://blogs.msdn.com/b/johnbreakwell/archive/2007/02/06/msmq-prefers-to-be-unique.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Resolve-FullPath</command:name> <maml:description> <maml:para>Converts a relative path to an absolute path.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Resolve</command:verb> <command:noun>FullPath</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Unlike `Resolve-Path`, this function does not check whether the path exists. It just converts relative paths to absolute paths. Unrooted paths (e.g. `..\..\See\I\Do\Not\Have\A\Root`) are first joined with the current directory (as returned by `Get-Location`).</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Resolve-FullPath</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Resolve-FullPath -Path 'C:\Projects\Carbon\Test\..\Carbon\FileSystem.ps1'</dev:code> <dev:remarks> <maml:para>Returns `C:\Projects\Carbon\Carbon\FileSystem.ps1`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Resolve-FullPath -Path 'C:\Projects\Carbon\..\I\Do\Not\Exist'</dev:code> <dev:remarks> <maml:para>Returns `C:\Projects\I\Do\Not\Exist`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Resolve-FullPath -Path ..\..\Foo\..\Bar</dev:code> <dev:remarks> <maml:para>Because the `Path` isn't rooted, joins `Path` with the current directory (as returned by `Get-Location`), and returns the full path. If the current directory is `C:\Projects\Carbon`, returns `C:\Bar`.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Resolve-Identity</command:name> <maml:description> <maml:para>Determines the identity of a user or group using its name.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Resolve</command:verb> <command:noun>Identity</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The common name for an account is not always the canonical name used by the operating system. For example, the local Administrators group is actually called BUILTIN\Administrators. This function uses the `LookupAccountName` Windows function to resolve an account name into its domain, name, full name, SID, and SID type. It returns a `Carbon.Identity` object with the following properties: * Domain - the domain the user was found in * FullName - the users full name, e.g. Domain\Name * Name - the user's username or the group's name * Type - the Sid type. * Sid - the account's security identifier as a `System.Security.Principal.SecurityIdentifier` object. If the name doesn't represent an actual user or group, an error is written and nothing is returned.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Resolve-Identity</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>Carbon.Identity</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Resolve-IdentityName -Name 'Administrators'</dev:code> <dev:remarks> <maml:para>Returns an object representing the `Administrators` group.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Test-Identity</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.security.principal.securityidentifier.aspx</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/windows/desktop/aa379601.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Resolve-NetPath</command:name> <maml:description> <maml:para>Returns the path to Windows' `net.exe` command.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Resolve</command:verb> <command:noun>NetPath</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>You can't always assume that `net.exe` is in your path. Use this function to return the path to `net.exe` regardless of paths in your path environment variable.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Resolve-NetPath</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Resolve-NetPath</dev:code> <dev:remarks> <maml:para>Returns `C:\Windows\system32\net.exe`. Usually.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Resolve-PathCase</command:name> <maml:description> <maml:para>Returns the real, canonical case of a path.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Resolve</command:verb> <command:noun>PathCase</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The .NET and Windows path/file system APIs respect and preserve the case of paths passed to them. This function will return the actual case of a path on the file system, regardless of the case of the string passed in. If the path doesn't an exist, an error is written and nothing is returned.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Resolve-PathCase</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName)" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName)" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <!-- Inputs--> <command:inputType> <dev:type> <maml:name>System.String</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Resolve-PathCase -Path "C:\WINDOWS\SYSTEM32"</dev:code> <dev:remarks> <maml:para>Returns `C:\Windows\system32`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Resolve-PathCase -Path 'c:\projects\carbon'</dev:code> <dev:remarks> <maml:para>Returns `C:\Projects\Carbon`.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Resolve-RelativePath</command:name> <maml:description> <maml:para>Converts a path to a relative path from a given source.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Resolve</command:verb> <command:noun>RelativePath</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The .NET framework doesn't expose an API for getting a relative path to an item. This function uses Win32 APIs to call [PathRelativePathTo](http://msdn.mi crosoft.com/en-us/library/windows/desktop/bb773740.aspx). Neither the `From` or `To` paths need to exist.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Resolve-RelativePath</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName)" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to convert to a relative path. It will be relative to the value of the From parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FromDirectory</maml:name> <maml:description> <maml:para>The source directory from which the relative path will be calculated. Can be a string or an file system object.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Resolve-RelativePath</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName)" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to convert to a relative path. It will be relative to the value of the From parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FromFile</maml:name> <maml:description> <maml:para>The source directory from which the relative path will be calculated. Can be a string or an file system object.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByPropertyName)" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to convert to a relative path. It will be relative to the value of the From parameter.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FromDirectory</maml:name> <maml:description> <maml:para>The source directory from which the relative path will be calculated. Can be a string or an file system object.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FromFile</maml:name> <maml:description> <maml:para>The source directory from which the relative path will be calculated. Can be a string or an file system object.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <!-- Inputs--> <command:inputType> <dev:type> <maml:name>System.String</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Resolve-RelativePath -Path 'C:\Program Files' -FromDirectory 'C:\Windows\system32'</dev:code> <dev:remarks> <maml:para>Returns `..\..\Program Files`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ChildItem * | Resolve-RelativePath -FromDirectory 'C:\Windows\system32'</dev:code> <dev:remarks> <maml:para>Returns the relative path from the `C:\Windows\system32` directory to the current directory.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Resolve-RelativePath -Path 'C:\I\do\not\exist\either' -FromDirectory 'C:\I\do\not\exist'</dev:code> <dev:remarks> <maml:para>Returns `.\either`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Resolve-RelativePath -Path 'C:\I\do\not\exist\either' -FromFile 'C:\I\do\not\exist_file'</dev:code> <dev:remarks> <maml:para>Treats `C:\I\do\not\exist_file` as a file, so returns a relative path of `.\exist\either`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/windows/desktop/bb773740.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Restart-RemoteService</command:name> <maml:description> <maml:para>Restarts a service on a remote machine.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Restart</command:verb> <command:noun>RemoteService</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>One of the annoying features of PowerShell is that the `Stop-Service`, `Start-Service` and `Restart-Service` cmdlets don't have `ComputerName` parameters to start/stop/restart a service on a remote computer. You have to use `Get-Service` to get the remote service: $service = Get-Service -Name DeathStar -ComputerName Yavin $service.Stop() $service.Start() # or (and no, you can't pipe the service directly to `Restart-Service`) Get-Service -Name DeathStar -ComputerName Yavin | ForEach-Object { Restart-Service -InputObject $_ } This function does all this unnecessary work for you. You'll get an error if you attempt to restart a non-existent service.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Restart-RemoteService</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The service name to restart.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The name of the computer where the service lives.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The service name to restart.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The name of the computer where the service lives.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Restart-RemoteService -Name DeathStar -ComputerName Yavin</dev:code> <dev:remarks> <maml:para>Restarts the `DeathStar` service on Yavin. If the DeathStar service doesn't exist, you'll get an error.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Revoke-ComPermission</command:name> <maml:description> <maml:para>Revokes COM Access or Launch and Activation permissions.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Revoke</command:verb> <command:noun>ComPermission</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Calling this function is equivalent to opening Component Services (dcomcnfg), right-clicking `My Computer` under Component Services > Computers, choosing `Properties`, going to the `COM Security` tab, and removing an identity from the permissions window that opens after clicking the `Edit Limits...` or `Edit Default...` buttons under `Access Permissions` or `Launch and Activation Permissions` section,</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Revoke-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Access</maml:name> <maml:description> <maml:para>Revokes Access Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Limits</maml:name> <maml:description> <maml:para>Revokes security limits permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Revoke-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Access</maml:name> <maml:description> <maml:para>Revokes Access Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Default</maml:name> <maml:description> <maml:para>Revokes default security permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Revoke-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LaunchAndActivation</maml:name> <maml:description> <maml:para>Revokes Launch and Activation Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Limits</maml:name> <maml:description> <maml:para>Revokes security limits permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Revoke-ComPermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LaunchAndActivation</maml:name> <maml:description> <maml:para>Revokes Launch and Activation Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Default</maml:name> <maml:description> <maml:para>Revokes default security permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Identity</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Access</maml:name> <maml:description> <maml:para>Revokes Access Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Limits</maml:name> <maml:description> <maml:para>Revokes security limits permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Default</maml:name> <maml:description> <maml:para>Revokes default security permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>LaunchAndActivation</maml:name> <maml:description> <maml:para>Revokes Launch and Activation Permissions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Revoke-ComPermission -Access -Identity 'Users' -Default</dev:code> <dev:remarks> <maml:para>Removes all default security COM access permissions for the local `Users` group.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Revoke-ComPermission -LaunchAndActivation -Identity 'Users' -Limits</dev:code> <dev:remarks> <maml:para>Removes all security limit COM access permissions for the local `Users` group.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-ComPermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-ComPermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Revoke-ComPermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Revoke-Permission</command:name> <maml:description> <maml:para>Revokes *explicit* permissions on a file, directory, registry key, or certificate's private key/key container.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Revoke</command:verb> <command:noun>Permission</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Revokes all of an identity's *explicit* permissions on a file, directory, registry key, or certificate's private key/key container. Only explicit permissions are considered; inherited permissions are ignored. If the identity doesn't have permission, nothing happens, not even errors written out.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Revoke-Permission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path on which the permissions should be revoked. Can be a file system, registry, or certificate path.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity losing permissions.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path on which the permissions should be revoked. Can be a file system, registry, or certificate path.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity losing permissions.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Revoke-Permission -Identity ENTERPRISE\Engineers -Path 'C:\EngineRoom'</dev:code> <dev:remarks> <maml:para>Demonstrates how to revoke all of the 'Engineers' permissions on the `C:\EngineRoom` directory.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Revoke-Permission -Identity ENTERPRISE\Interns -Path 'hklm:\system\WarpDrive'</dev:code> <dev:remarks> <maml:para>Demonstrates how to revoke permission on a registry key.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Revoke-Permission -Identity ENTERPRISE\Officers -Path 'cert:\LocalMachine\My\1234567890ABCDEF1234567890ABCDEF12345678'</dev:code> <dev:remarks> <maml:para>Demonstrates how to revoke the Officers' permission to the `cert:\LocalMachine\My\1234567890ABCDEF1234567890ABCDEF12345678` certificate's private key/key container.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Carbon_Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Protect-Acl</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Revoke-Privilege</command:name> <maml:description> <maml:para>Revokes an identity's privileges to perform system operations and certain types of logons.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Revoke</command:verb> <command:noun>Privilege</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Valid privileges are documented on Microsoft's website: [Privilege Constants](ht tp://msdn.microsoft.com/en-us/library/windows/desktop/bb530716.aspx) and [Account Right Constants](http://msdn.microsoft.com/en-us/library/windows/deskto p/bb545671.aspx). Known values as of August 2014 are: * SeAssignPrimaryTokenPrivilege * SeAuditPrivilege * SeBackupPrivilege * SeBatchLogonRight * SeChangeNotifyPrivilege * SeCreateGlobalPrivilege * SeCreatePagefilePrivilege * SeCreatePermanentPrivilege * SeCreateSymbolicLinkPrivilege * SeCreateTokenPrivilege * SeDebugPrivilege * SeDenyBatchLogonRight * SeDenyInteractiveLogonRight * SeDenyNetworkLogonRight * SeDenyRemoteInteractiveLogonRight * SeDenyServiceLogonRight * SeEnableDelegationPrivilege * SeImpersonatePrivilege * SeIncreaseBasePriorityPrivilege * SeIncreaseQuotaPrivilege * SeIncreaseWorkingSetPrivilege * SeInteractiveLogonRight * SeLoadDriverPrivilege * SeLockMemoryPrivilege * SeMachineAccountPrivilege * SeManageVolumePrivilege * SeNetworkLogonRight * SeProfileSingleProcessPrivilege * SeRelabelPrivilege * SeRemoteInteractiveLogonRight * SeRemoteShutdownPrivilege * SeRestorePrivilege * SeSecurityPrivilege * SeServiceLogonRight * SeShutdownPrivilege * SeSyncAgentPrivilege * SeSystemEnvironmentPrivilege * SeSystemProfilePrivilege * SeSystemtimePrivilege * SeTakeOwnershipPrivilege * SeTcbPrivilege * SeTimeZonePrivilege * SeTrustedCredManAccessPrivilege * SeUndockPrivilege * SeUnsolicitedInputPrivilege</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Revoke-Privilege</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity to grant a privilege.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Privilege</maml:name> <maml:description> <maml:para>The privileges to revoke.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity to grant a privilege.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Privilege</maml:name> <maml:description> <maml:para>The privileges to revoke.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Revoke-Privilege -Identity Batcomputer -Privilege SeServiceLogonRight</dev:code> <dev:remarks> <maml:para>Revokes the Batcomputer account's ability to logon as a service. Don't restart that thing!</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Carbon_Privilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-Privilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-Privilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-Privilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/windows/desktop/bb530716.aspx</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/windows/desktop/bb545671.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Revoke-ServicePermission</command:name> <maml:description> <maml:para>Removes all permissions an identity has to manage a service.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Revoke</command:verb> <command:noun>ServicePermission</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>No permissions are left behind. This is an all or nothing operation, baby!</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Revoke-ServicePermission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The service.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity whose permissions are being revoked.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The service.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity whose permissions are being revoked.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Revoke-ServicePermission -Name 'Hyperdrive` -Identity 'CLOUDCITY\LCalrissian'</dev:code> <dev:remarks> <maml:para>Removes all of Lando's permissions to control the `Hyperdrive` service.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-ServicePermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-ServicePermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-DotNetAppSetting</command:name> <maml:description> <maml:para>Sets an app setting in the .NET machine.config file.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>DotNetAppSetting</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The app setting can be set in up to four different machine.config files: * .NET 2.0 32-bit (switches -Clr2 -Framework) * .NET 2.0 64-bit (switches -Clr2 -Framework64) * .NET 4.0 32-bit (switches -Clr4 -Framework) * .NET 4.0 64-bit (switches -Clr4 -Framework64) Any combination of Framework and Clr switch can be used, but you MUST supply one of each.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-DotNetAppSetting</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the app setting to be set</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Value</maml:name> <maml:description> <maml:para>The valie of the app setting to be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Framework</maml:name> <maml:description> <maml:para>Set the app setting in the 32-bit machine.config.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Framework64</maml:name> <maml:description> <maml:para>Set the app setting in the 64-bit machine.config. Ignored if running on a 32-bit operating system.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Clr2</maml:name> <maml:description> <maml:para>Set the app setting in the .NET 2.0 machine.config.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Clr4</maml:name> <maml:description> <maml:para>Set the app setting in the .NET 4.0 machine.config.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the app setting to be set</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Value</maml:name> <maml:description> <maml:para>The valie of the app setting to be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Framework</maml:name> <maml:description> <maml:para>Set the app setting in the 32-bit machine.config.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Framework64</maml:name> <maml:description> <maml:para>Set the app setting in the 64-bit machine.config. Ignored if running on a 32-bit operating system.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Clr2</maml:name> <maml:description> <maml:para>Set the app setting in the .NET 2.0 machine.config.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Clr4</maml:name> <maml:description> <maml:para>Set the app setting in the .NET 4.0 machine.config.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>></maml:para> </maml:introduction> <dev:code>Set-DotNetAppSetting -Name ExampleUrl -Value example.com -Framework -Framework64 -Clr2 -Clr4</dev:code> <dev:remarks> <maml:para>Sets the ExampleUrl app setting in the following machine.config files: * `%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config` * `%SYSTEMROOT%\Microsoft.NET\Framework64\v2.0.50727\CONFIG\machine.config` * `%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319\CONFIG\machine.config` * `%SYSTEMROOT%\Microsoft.NET\Framework64\v4.0.30319\CONFIG\machine.config`</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>></maml:para> </maml:introduction> <dev:code>Set-DotNetAppSetting -Name ExampleUrl -Value example.com -Framework64 -Clr4</dev:code> <dev:remarks> <maml:para>Sets the ExampleUrl app setting in the following machine.config file: * `%SYSTEMROOT%\Microsoft.NET\Framework64\v4.0.30319\CONFIG\machine.config`</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-DotNetConnectionString</command:name> <maml:description> <maml:para>Sets a named connection string in the .NET machine.config file</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>DotNetConnectionString</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The connection string setting can be set in up to four different machine.config files: * .NET 2.0 32-bit (switches -Clr2 -Framework) * .NET 2.0 64-bit (switches -Clr2 -Framework64) * .NET 4.0 32-bit (switches -Clr4 -Framework) * .NET 4.0 64-bit (switches -Clr4 -Framework64) Any combination of Framework and Clr switch can be used, but you MUST supply one of each.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-DotNetConnectionString</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the .net connection string to be set</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Value</maml:name> <maml:description> <maml:para>The connection string to be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>ProviderName</maml:name> <maml:description> <maml:para>The provider name for the connection string.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Framework</maml:name> <maml:description> <maml:para>Set the connection string in the 32-bit machine.config.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Framework64</maml:name> <maml:description> <maml:para>Set the connection string in the 64-bit machine.config</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Clr2</maml:name> <maml:description> <maml:para>Set the app setting in the .NET 2.0 machine.config. This flag won't work under PowerShell 3.0.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Clr4</maml:name> <maml:description> <maml:para>Set the app setting in the .NET 4.0 machine.config.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the .net connection string to be set</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Value</maml:name> <maml:description> <maml:para>The connection string to be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>ProviderName</maml:name> <maml:description> <maml:para>The provider name for the connection string.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Framework</maml:name> <maml:description> <maml:para>Set the connection string in the 32-bit machine.config.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Framework64</maml:name> <maml:description> <maml:para>Set the connection string in the 64-bit machine.config</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Clr2</maml:name> <maml:description> <maml:para>Set the app setting in the .NET 2.0 machine.config. This flag won't work under PowerShell 3.0.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Clr4</maml:name> <maml:description> <maml:para>Set the app setting in the .NET 4.0 machine.config.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>></maml:para> </maml:introduction> <dev:code>Set-DotNetConnectionString -Name DevDB -Value "data source=.\DevDB;Integrated Security=SSPI;" -Framework -Framework64 -Clr2 -Clr4</dev:code> <dev:remarks> <maml:para>Sets the DevDB connection string in the following machine.config files: * `%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config` * `%SYSTEMROOT%\Microsoft.NET\Framework64\v2.0.50727\CONFIG\machine.config` * `%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319\CONFIG\machine.config` * `%SYSTEMROOT%\Microsoft.NET\Framework64\v4.0.30319\CONFIG\machine.config`</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>></maml:para> </maml:introduction> <dev:code>Set-DotNetConnectionString -Name DevDB -Value "data source=.\DevDB;Integrated Security=SSPI;" -Framework64 -Clr4</dev:code> <dev:remarks> <maml:para>Sets the DevDB connection string in the `%SYSTEMROOT%\Microsoft.NET\Framework64\v4.0.30319\CONFIG\machine.config` machine.config file to: <add name="DevDB" connectionString="data source=.\DevDB;Integrated Security=SSPI;" /></maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-DotNetConnectionString -Name Prod -Value "data source=proddb\Prod;Integrated Security=SSPI" -ProviderName 'System.Data.SqlClient' -Framework -Clr2</dev:code> <dev:remarks> <maml:para>Creates the following connection string in the `%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config` file: <add name="Prod" connectionString="data source=proddb\Prod;Integrated Security=SSPI" providerName="System.Data.SqlClient" /></maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-EnvironmentVariable</command:name> <maml:description> <maml:para>Creates or sets an environment variable.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>EnvironmentVariable</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses the .NET [Environment class](http://msdn.microsoft.com/en-us/library/z8te35sa) to create or set an environment variable in the Process, User, or Machine scopes. Changes to environment variables in the User and Machine scope are not picked up by running processes. Any running processes that use this environment variable should be restarted.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-EnvironmentVariable</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of environment variable to add/set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Value</maml:name> <maml:description> <maml:para>The environment variable's value.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForProcess</maml:name> <maml:description> <maml:para>Sets the environment variable for the current process.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForUser</maml:name> <maml:description> <maml:para>Sets the environment variable for the current user.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForComputer</maml:name> <maml:description> <maml:para>Sets the environment variable for the current computer.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of environment variable to add/set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Value</maml:name> <maml:description> <maml:para>The environment variable's value.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForProcess</maml:name> <maml:description> <maml:para>Sets the environment variable for the current process.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForUser</maml:name> <maml:description> <maml:para>Sets the environment variable for the current user.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ForComputer</maml:name> <maml:description> <maml:para>Sets the environment variable for the current computer.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-EnvironmentVariable -Name 'MyEnvironmentVariable' -Value 'Value1' -ForProcess</dev:code> <dev:remarks> <maml:para>Creates the `MyEnvironmentVariable` with an initial value of `Value1` in the process scope, i.e. the variable is only accessible in the current process.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-EnvironmentVariable -Name 'MyEnvironmentVariable' -Value 'Value1' -ForComputer</dev:code> <dev:remarks> <maml:para>Creates the `MyEnvironmentVariable` with an initial value of `Value1` in the machine scope, i.e. the variable is accessible in all newly launched processes.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Carbon_EnvironmentVariable</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Remove-EnvironmentVariable</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/z8te35sa</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-HostsEntry</command:name> <maml:description> <maml:para>Sets a hosts entry in a hosts file.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>HostsEntry</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Sets the IP address for a given hostname. If the hostname doesn't exist in the hosts file, appends a new entry to the end. If the hostname does exist, its IP address gets updated. If you supply a description, it is appended to the line as a comment. If any duplicate hosts entries are found, they are commented out; Windows uses the first duplicate entry. This function scans the entire hosts file. If you have a large hosts file, and are updating multiple entries, this function will be slow. You can operate on a custom hosts file, too. Pass its path with the `Path` parameter. Sometimes the system's hosts file is in use and locked when you try to update it. The `Set-HostsEntry` function tries 10 times to set a hosts entry before giving up and writing an error. It waits a random amount of time (from 0 to 1000 milliseconds) between each attempt.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-HostsEntry</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>IPAddress</maml:name> <maml:description> <maml:para>The IP address for the hosts entry.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>HostName</maml:name> <maml:description> <maml:para>The hostname for the hosts entry.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Description</maml:name> <maml:description> <maml:para>An optional description of the hosts entry.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the hosts file where the entry should be set. Defaults to the local computer's hosts file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>IPAddress</maml:name> <maml:description> <maml:para>The IP address for the hosts entry.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue> <dev:type> <maml:name>IPAddress</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>HostName</maml:name> <maml:description> <maml:para>The hostname for the hosts entry.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Description</maml:name> <maml:description> <maml:para>An optional description of the hosts entry.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the hosts file where the entry should be set. Defaults to the local computer's hosts file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-HostsEntry -IPAddress 10.2.3.4 -HostName 'myserver' -Description "myserver's IP address"</dev:code> <dev:remarks> <maml:para>If your hosts file contains the following: 127.0.0.1 localhost After running this command, it will contain the following: 127.0.0.1 localhost 10.2.3.4 myserver # myserver's IP address</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-HostsEntry -IPAddress 10.5.6.7 -HostName 'myserver'</dev:code> <dev:remarks> <maml:para>If your hosts file contains the following: 127.0.0.1 localhost 10.2.3.4 myserver # myserver's IP address After running this command, it will contain the following: 127.0.0.1 localhost 10.5.6.7 myserver</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-IisHttpHeader</command:name> <maml:description> <maml:para>Sets an HTTP header for a website or a directory under a website.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>IisHttpHeader</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>If the HTTP header doesn't exist, it is created. If a header exists, its value is replaced.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-IisHttpHeader</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the website where the HTTP header should be set/created.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path under `SiteName` where the HTTP header should be set/created.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the HTTP header.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>Value</maml:name> <maml:description> <maml:para>The value of the HTTP header.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the website where the HTTP header should be set/created.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path under `SiteName` where the HTTP header should be set/created.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the HTTP header.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>Value</maml:name> <maml:description> <maml:para>The value of the HTTP header.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-IisHttpHeader -SiteName 'SopwithCamel' -Name 'X-Flown-By' -Value 'Snoopy'</dev:code> <dev:remarks> <maml:para>Sets or creates the `SopwithCamel` website's `X-Flown-By` HTTP header to the value `Snoopy`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-IisHttpHeader -SiteName 'SopwithCamel' -VirtualPath 'Engine' -Name 'X-Powered-By' -Value 'Root Beer'</dev:code> <dev:remarks> <maml:para>Sets or creates the `SopwithCamel` website's `Engine` sub-directory's `X-Powered-By` HTTP header to the value `Root Beer`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-IisHttpHeader</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-IisHttpRedirect</command:name> <maml:description> <maml:para>Turns on HTTP redirect for all or part of a website.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>IisHttpRedirect</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Configures all or part of a website to redirect all requests to another website/URL. By default, it operates on a specific website. To configure a directory under a website, set `VirtualPath` to the virtual path of that directory.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-IisHttpRedirect</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where the redirection should be setup.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where redirection should be setup.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Destination</maml:name> <maml:description> <maml:para>The destination to redirect to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>HttpResponseStatus</maml:name> <maml:description> <maml:para>The HTTP status code to use. Default is `Found`. Should be one of `Found` (HTTP 302), `Permanent` (HTTP 301), or `Temporary` (HTTP 307).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">HttpResponseStatus</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ExactDestination</maml:name> <maml:description> <maml:para>Redirect all requests to exact destination (instead of relative to destination). I have no idea what this means. [Maybe TechNet can help.](http://technet.microsoft.com/en-us/library/cc732969(v=WS.10).aspx)</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ChildOnly</maml:name> <maml:description> <maml:para>Only redirect requests to content in site and/or path, but nothing below it. I have no idea what this means. [Maybe TechNet can help.](http://technet.microsoft.com/en-us/library/cc732969(v=WS.10).aspx)</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where the redirection should be setup.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where redirection should be setup.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Destination</maml:name> <maml:description> <maml:para>The destination to redirect to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>HttpResponseStatus</maml:name> <maml:description> <maml:para>The HTTP status code to use. Default is `Found`. Should be one of `Found` (HTTP 302), `Permanent` (HTTP 301), or `Temporary` (HTTP 307).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">HttpResponseStatus</command:parameterValue> <dev:type> <maml:name>HttpResponseStatus</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ExactDestination</maml:name> <maml:description> <maml:para>Redirect all requests to exact destination (instead of relative to destination). I have no idea what this means. [Maybe TechNet can help.](http://technet.microsoft.com/en-us/library/cc732969(v=WS.10).aspx)</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ChildOnly</maml:name> <maml:description> <maml:para>Only redirect requests to content in site and/or path, but nothing below it. I have no idea what this means. [Maybe TechNet can help.](http://technet.microsoft.com/en-us/library/cc732969(v=WS.10).aspx)</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-IisHttpRedirect -SiteName Peanuts -Destination 'http://new.peanuts.com'</dev:code> <dev:remarks> <maml:para>Redirects all requests to the `Peanuts` website to `http://new.peanuts.com`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-IisHttpRedirect -SiteName Peanuts -VirtualPath Snoopy/DogHouse -Destination 'http://new.peanuts.com'</dev:code> <dev:remarks> <maml:para>Redirects all requests to the `/Snoopy/DogHouse` path on the `Peanuts` website to `http://new.peanuts.com`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-IisHttpRedirect -SiteName Peanuts -Destination 'http://new.peanuts.com' -StatusCode 'Temporary'</dev:code> <dev:remarks> <maml:para>Redirects all requests to the `Peanuts` website to `http://new.peanuts.com` with a temporary HTTP status code. You can also specify `Found` (HTTP 302), or `Permanent` (HTTP 301).</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://www.iis.net/configreference/system.webserver/httpredirect#005</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://technet.microsoft.com/en-us/library/cc732969(v=WS.10).aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-IisMimeMap</command:name> <maml:description> <maml:para>Creates or sets a file extension to MIME type map for an entire web server.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>IisMimeMap</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>IIS won't serve static files unless they have an entry in the MIME map. Use this function to create/update a MIME map entry.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-IisMimeMap</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FileExtension</maml:name> <maml:description> <maml:para>The file extension to set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MimeType</maml:name> <maml:description> <maml:para>The MIME type to serve the files as.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Set-IisMimeMap</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the website whose MIME type to set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional site path whose configuration should be returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FileExtension</maml:name> <maml:description> <maml:para>The file extension to set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MimeType</maml:name> <maml:description> <maml:para>The MIME type to serve the files as.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>FileExtension</maml:name> <maml:description> <maml:para>The file extension to set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MimeType</maml:name> <maml:description> <maml:para>The MIME type to serve the files as.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the website whose MIME type to set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional site path whose configuration should be returned.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-IisMimeMap -FileExtension '.m4v' -MimeType 'video/x-m4v'</dev:code> <dev:remarks> <maml:para>Adds a MIME map so that IIS will serve `.m4v` files as `video/x-m4v`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-IisMimeMap</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Remove-IisMimeMap</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-IisWebsiteID</command:name> <maml:description> <maml:para>Sets a website's ID to an explicit number.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>IisWebsiteID</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>IIS handles assigning websites individual IDs. This method will assign a website explicit ID you manage (e.g. to support session sharing in a web server farm). If another site already exists with that ID, you'll get an error. When you change a website's ID, IIS will stop the site, but not start the site after saving the ID change. This function waits until the site's ID is changed, and then will start the website.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-IisWebsiteID</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The website name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>ID</maml:name> <maml:description> <maml:para>The website's new ID.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The website name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>ID</maml:name> <maml:description> <maml:para>The website's new ID.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-IisWebsiteID -SiteName Holodeck -ID 483</dev:code> <dev:remarks> <maml:para>Sets the `Holodeck` website's ID to `483`.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-IisWebsiteSslCertificate</command:name> <maml:description> <maml:para>Sets a website's SSL certificate.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>IisWebsiteSslCertificate</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>SSL won't work on a website if an SSL certificate hasn't been bound to all the IP addresses it's listening on. This function binds a certificate to all a website's IP addresses. Make sure you call this method *after* you create a website's bindings. Any previous SSL bindings on those IP addresses are deleted.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-IisWebsiteSslCertificate</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the website whose SSL certificate is being set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Thumbprint</maml:name> <maml:description> <maml:para>The thumbprint of the SSL certificate to use.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>ApplicationID</maml:name> <maml:description> <maml:para>A GUID that uniquely identifies this website. Create your own.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Guid</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the website whose SSL certificate is being set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Thumbprint</maml:name> <maml:description> <maml:para>The thumbprint of the SSL certificate to use.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>ApplicationID</maml:name> <maml:description> <maml:para>A GUID that uniquely identifies this website. Create your own.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Guid</command:parameterValue> <dev:type> <maml:name>Guid</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-IisWebsiteSslCertificate -SiteName Peanuts -Thumbprint 'a909502dd82ae41433e6f83886b00d4277a32a7b' -ApplicationID $PeanutsAppID</dev:code> <dev:remarks> <maml:para>Binds the certificate whose thumbprint is `a909502dd82ae41433e6f83886b00d4277a32a7b` to the `Peanuts` website. It's a good idea to re-use the same GUID for each distinct application.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-IisWindowsAuthentication</command:name> <maml:description> <maml:para>Configures the settings for Windows authentication.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>IisWindowsAuthentication</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>By default, configures Windows authentication on a website. You can configure Windows authentication at a specific path under a website by passing the virtual path (*not* the physical path) to that directory. The changes only take effect if Windows authentication is enabled (see `Enable-IisSecurityAuthentication`).</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-IisWindowsAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where Windows authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where Windows authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DisableKernelMode</maml:name> <maml:description> <maml:para>Turn on kernel mode. Default is false. [More information about Kerndel Mode au thentication.](http://blogs.msdn.com/b/webtopics/archive/2009/01/19/service-prin cipal-name-spn-checklist-for-kerberos-authentication-with-iis-7-0.aspx)</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where Windows authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where Windows authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DisableKernelMode</maml:name> <maml:description> <maml:para>Turn on kernel mode. Default is false. [More information about Kerndel Mode au thentication.](http://blogs.msdn.com/b/webtopics/archive/2009/01/19/service-prin cipal-name-spn-checklist-for-kerberos-authentication-with-iis-7-0.aspx)</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-IisWindowsAuthentication -SiteName Peanuts</dev:code> <dev:remarks> <maml:para>Configures Windows authentication on the `Peanuts` site to use kernel mode.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-IisWindowsAuthentication -SiteName Peanuts -VirtualPath Snoopy/DogHouse -DisableKernelMode</dev:code> <dev:remarks> <maml:para>Configures Windows authentication on the `Doghouse` directory of the `Peanuts` site to not use kernel mode.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://blogs.msdn.com/b/webtopics/archive/2009/01/19/service-principal-name-spn-checklist-for-kerberos-authentication-with-iis-7-0.aspx</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Disable-IisSecurityAuthentication</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Enable-IisSecurityAuthentication</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-IniEntry</command:name> <maml:description> <maml:para>Sets an entry in an INI file.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>IniEntry</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>A configuration file consists of sections, led by a `[section]` header and followed by `name = value` entries. This function creates or updates an entry in an INI file. Something like this: [ui] username = Regina Spektor <regina@reginaspektor.com> [extensions] share = extdiff = Names are not allowed to contains the equal sign, `=`. Values can contain any character. The INI file is parsed using `Split-Ini`. [See its documentation for more examples.](Split-Ini.html) Be default, operates on the INI file case-insensitively. If your INI is case-sensitive, use the `-CaseSensitive` switch.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-IniEntry</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the INI file to set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the INI entry being set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Value</maml:name> <maml:description> <maml:para>The value of the INI entry being set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>Section</maml:name> <maml:description> <maml:para>The section of the INI where the entry should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CaseSensitive</maml:name> <maml:description> <maml:para>Treat the INI file in a case-sensitive manner.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the INI file to set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the INI entry being set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Value</maml:name> <maml:description> <maml:para>The value of the INI entry being set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>Section</maml:name> <maml:description> <maml:para>The section of the INI where the entry should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CaseSensitive</maml:name> <maml:description> <maml:para>Treat the INI file in a case-sensitive manner.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-IniEntry -Path C:\Users\rspektor\mercurial.ini -Section extensions -Name share -Value ''</dev:code> <dev:remarks> <maml:para>If the `C:\Users\rspektor\mercurial.ini` file is empty, adds the following to it: [extensions] share =</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-IniEntry -Path C:\Users\rspektor\music.ini -Name genres -Value 'alternative,rock'</dev:code> <dev:remarks> <maml:para>If the `music.ini` file is empty, adds the following to it: genres = alternative,rock</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-IniEntry -Path C:\Users\rspektor\music.ini -Name genres -Value 'alternative,rock,world'</dev:code> <dev:remarks> <maml:para>If the `music.ini` file contains the following: genres = r&b After running this command, `music.ini` will look like this: genres = alternative,rock,world</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-IniEntry -Path C:\users\me\npmrc -Name prefix -Value 'C:\Users\me\npm_modules' -CaseSensitive</dev:code> <dev:remarks> <maml:para>Demonstrates how to set an INI entry in a case-sensitive file.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Split-Ini LINK Remove-IniEntry</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-RegistryKeyValue</command:name> <maml:description> <maml:para>Sets a value in a registry key.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>RegistryKeyValue</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>If the key doesn't exist, it is created. If the value doesn't exist, it is created.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-RegistryKeyValue</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the registry key where the value should be set. Will be created if it doesn't exist.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the value being set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>String</maml:name> <maml:description> <maml:para>The value's data. Creates a value for holding string data (i.e. `REG_SZ`).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Expand</maml:name> <maml:description> <maml:para>The string should be expanded when retrieved. Creates a value for holding expanded string data (i.e. `REG_EXPAND_SZ`).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Removes and re-creates the value. Useful for changing a value's type.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>If set, won't write any information about what values are being set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Set-RegistryKeyValue</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the registry key where the value should be set. Will be created if it doesn't exist.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the value being set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Binary</maml:name> <maml:description> <maml:para>The value's data. Creates a value for holding binary data (i.e. `REG_BINARY`).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Byte[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Removes and re-creates the value. Useful for changing a value's type.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>If set, won't write any information about what values are being set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Set-RegistryKeyValue</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the registry key where the value should be set. Will be created if it doesn't exist.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the value being set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DWord</maml:name> <maml:description> <maml:para>The value's data. Creates a value for holding a 32-bit integer (i.e. `REG_DWORD`).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Removes and re-creates the value. Useful for changing a value's type.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>If set, won't write any information about what values are being set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Set-RegistryKeyValue</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the registry key where the value should be set. Will be created if it doesn't exist.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the value being set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QWord</maml:name> <maml:description> <maml:para>The value's data. Creates a value for holding a 64-bit integer (i.e. `REG_QWORD`).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int64</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Removes and re-creates the value. Useful for changing a value's type.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>If set, won't write any information about what values are being set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Set-RegistryKeyValue</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the registry key where the value should be set. Will be created if it doesn't exist.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the value being set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Strings</maml:name> <maml:description> <maml:para>The value's data. Creates a value for holding an array of strings (i.e. `REG_MULTI_SZ`).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Removes and re-creates the value. Useful for changing a value's type.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>If set, won't write any information about what values are being set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the registry key where the value should be set. Will be created if it doesn't exist.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the value being set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>String</maml:name> <maml:description> <maml:para>The value's data. Creates a value for holding string data (i.e. `REG_SZ`).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Expand</maml:name> <maml:description> <maml:para>The string should be expanded when retrieved. Creates a value for holding expanded string data (i.e. `REG_EXPAND_SZ`).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Force</maml:name> <maml:description> <maml:para>Removes and re-creates the value. Useful for changing a value's type.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Quiet</maml:name> <maml:description> <maml:para>If set, won't write any information about what values are being set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Binary</maml:name> <maml:description> <maml:para>The value's data. Creates a value for holding binary data (i.e. `REG_BINARY`).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Byte[]</command:parameterValue> <dev:type> <maml:name>Byte[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>DWord</maml:name> <maml:description> <maml:para>The value's data. Creates a value for holding a 32-bit integer (i.e. `REG_DWORD`).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>QWord</maml:name> <maml:description> <maml:para>The value's data. Creates a value for holding a 64-bit integer (i.e. `REG_QWORD`).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int64</command:parameterValue> <dev:type> <maml:name>Int64</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Strings</maml:name> <maml:description> <maml:para>The value's data. Creates a value for holding an array of strings (i.e. `REG_MULTI_SZ`).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-RegistryKeyValue -Path 'hklm:\Software\Carbon\Test -Name Status -String foobar</dev:code> <dev:remarks> <maml:para>Creates the `Status` string value under the `hklm:\Software\Carbon\Test` key and sets its value to `foobar`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-RegistryKeyValue -Path 'hklm:\Software\Carbon\Test -Name ComputerName -String '%ComputerName%' -Expand</dev:code> <dev:remarks> <maml:para>Creates an expandable string. When retrieving this value, environment variables will be expanded.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-RegistryKeyValue -Path 'hklm:\Software\Carbon\Test -Name Movies -String ('Signs','Star Wars','Raiders of the Lost Ark')</dev:code> <dev:remarks> <maml:para>Sets a multi-string (i.e. array) value.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-RegistryKeyValue -Path hklm:\Software\Carbon\Test -Name 'SomeBytes' -Binary ([byte[]]@( 1, 2, 3, 4))</dev:code> <dev:remarks> <maml:para>Sets a binary value (i.e. `REG_BINARY`).</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-RegistryKeyValue -Path hklm:\Software\Carbon\Test -Name 'AnInt' -DWord 48043</dev:code> <dev:remarks> <maml:para>Sets a binary value (i.e. `REG_DWORD`).</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 6 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-RegistryKeyValue -Path hklm:\Software\Carbon\Test -Name 'AnInt64' -QWord 9223372036854775807</dev:code> <dev:remarks> <maml:para>Sets a binary value (i.e. `REG_QWORD`).</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 7 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-RegistryKeyValue -Path hklm:\Software\Carbon\Test -Name 'UsedToBeAStringNowShouldBeDWord' -DWord 1 -Force</dev:code> <dev:remarks> <maml:para>Uses the `Force` parameter to delete the existing `UsedToBeAStringNowShouldBeDWord` before re-creating it. This flag is useful if you need to change the type of a registry value.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-RegistryKeyValue</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-RegistryKeyValue</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-ServiceAcl</command:name> <maml:description> <maml:para>Sets a service's discretionary access control list (i.e. DACL).</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>ServiceAcl</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The existing DACL is replaced with the new DACL. No previous permissions are preserved. That's your job. You're warned! You probably want `Grant-ServicePermission` or `Revoke-ServicePermission` instead.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-ServiceAcl</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The service whose DACL to replace.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Dacl</maml:name> <maml:description> <maml:para>The service's new DACL.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">DiscretionaryAcl</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The service whose DACL to replace.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Dacl</maml:name> <maml:description> <maml:para>The service's new DACL.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">DiscretionaryAcl</command:parameterValue> <dev:type> <maml:name>DiscretionaryAcl</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-ServiceDacl -Name 'Hyperdrive' -Dacl $dacl</dev:code> <dev:remarks> <maml:para>Replaces the DACL on the `Hyperdrive` service. Yikes! Sounds like something the Empire would do, though.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-ServicePermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-ServicePermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Revoke-ServicePermission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-SslCertificateBinding</command:name> <maml:description> <maml:para>Sets an SSL certificate binding for a given IP/port.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>SslCertificateBinding</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses the netsh command line application to set the certificate for an IP address and port. If a binding already exists for the IP/port, it is removed, and the new binding is created. Returns a `Carbon.Certificates.SslCertificateBinding` object for the binding that was set.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-SslCertificateBinding</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>IPAddress</maml:name> <maml:description> <maml:para>The IP address for the binding. Defaults to all IP addresses.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">IPAddress</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Port</maml:name> <maml:description> <maml:para>The port for the binding. Defaults to 443.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">UInt16</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>ApplicationID</maml:name> <maml:description> <maml:para>A unique ID representing the application using the binding. Create your own.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Guid</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>Thumbprint</maml:name> <maml:description> <maml:para>The thumbprint of the certificate to use. The certificate must be installed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>IPAddress</maml:name> <maml:description> <maml:para>The IP address for the binding. Defaults to all IP addresses.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">IPAddress</command:parameterValue> <dev:type> <maml:name>IPAddress</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Port</maml:name> <maml:description> <maml:para>The port for the binding. Defaults to 443.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">UInt16</command:parameterValue> <dev:type> <maml:name>UInt16</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>ApplicationID</maml:name> <maml:description> <maml:para>A unique ID representing the application using the binding. Create your own.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Guid</command:parameterValue> <dev:type> <maml:name>Guid</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>Thumbprint</maml:name> <maml:description> <maml:para>The thumbprint of the certificate to use. The certificate must be installed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-SslCertificateBinding -IPAddress 43.27.89.54 -Port 443 -ApplicationID 88d1f8da-aeb5-40a2-a5e5-0e6107825df7 -Thumbprint 4789073458907345907434789073458907345907</dev:code> <dev:remarks> <maml:para>Configures the computer to use the 478907345890734590743 certificate on IP 43.27.89.54, port 443.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-SslCertificateBinding -ApplicationID 88d1f8da-aeb5-40a2-a5e5-0e6107825df7 -Thumbprint 4789073458907345907434789073458907345907</dev:code> <dev:remarks> <maml:para>Configures the compute to use the 478907345890734590743 certificate as the default certificate on all IP addresses, port 443.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Set-TrustedHost</command:name> <maml:description> <maml:para>Sets the current computer's trusted hosts list.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Set</command:verb> <command:noun>TrustedHost</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Clears the current trusted hosts list, and sets it to contain only the entries given by the `Entries` parameter. To clear the trusted hosts list, use `Clear-TrustedHost`.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Set-TrustedHost</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Entry</maml:name> <maml:description> <maml:para>An array of trusted host entries.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Entry</maml:name> <maml:description> <maml:para>An array of trusted host entries.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Set-TrustedHost -Entry example.com,api.example.com,docs.example.com</dev:code> <dev:remarks> <maml:para>Sets the trusted hosts list to contain just the values `example.com`, `api.example.com`, and `docs.example.com`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Clear-TrustedHost</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Split-Ini</command:name> <maml:description> <maml:para>Reads an INI file and returns its contents.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Split</command:verb> <command:noun>Ini</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>A configuration file consists of sections, led by a "[section]" header and followed by "name = value" entries: [spam] eggs=ham green= eggs [stars] sneetches = belly By default, the INI file will be returned as `Carbon.Ini.IniNode` objects for each name/value pair. For example, given the INI file above, the following will be returned: Line FullName Section Name Value ---- -------- ------- ---- ----- 2 spam.eggs spam eggs ham 3 spam.green spam green eggs 7 stars.sneetches stars sneetches belly It is sometimes useful to get a hashtable back of the name/values. The `AsHashtable` switch will return a hashtable where the keys are the full names of the name/value pairs. For example, given the INI file above, the following hashtable is returned: Name Value ---- ----- spam.eggs Carbon.Ini.IniNode; spam.green Carbon.Ini.IniNode; stars.sneetches Carbon.Ini.IniNode; } Each line of an INI file contains one entry. If the lines that follow are indented, they are treated as continuations of that entry. Leading whitespace is removed from values. Empty lines are skipped. Lines beginning with "#" or ";" are ignored and may be used to provide comments. Configuration keys can be set multiple times, in which case Split-Ini will use the value that was configured last. As an example: [spam] eggs=large ham=serrano eggs=small This would set the configuration key named "eggs" to "small". It is also possible to define a section multiple times. For example: [foo] eggs=large ham=serrano eggs=small [bar] eggs=ham green= eggs [foo] ham=prosciutto eggs=medium bread=toasted This would set the "eggs", "ham", and "bread" configuration keys of the "foo" section to "medium", "prosciutto", and "toasted", respectively. As you can see, the only thing that matters is the last value that was set for each of the configuration keys. Be default, operates on the INI file case-insensitively. If your INI is case-sensitive, use the `-CaseSensitive` switch.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Split-Ini</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the mercurial INI file to read.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AsHashtable</maml:name> <maml:description> <maml:para>Pass each parsed setting down the pipeline instead of collecting them all into a hashtable.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CaseSensitive</maml:name> <maml:description> <maml:para>Parses the INI file in a case-sensitive manner.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the mercurial INI file to read.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AsHashtable</maml:name> <maml:description> <maml:para>Pass each parsed setting down the pipeline instead of collecting them all into a hashtable.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CaseSensitive</maml:name> <maml:description> <maml:para>Parses the INI file in a case-sensitive manner.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Split-Ini -Path C:\Users\rspektor\mercurial.ini</dev:code> <dev:remarks> <maml:para>Given this INI file: [ui] username = Regina Spektor <regina@reginaspektor.com> [extensions] share = extdiff = `Split-Ini` returns the following objects to the pipeline: Line FullName Section Name Value ---- -------- ------- ---- ----- 2 ui.username ui username Regina Spektor <regina@reginaspektor.com> 5 extensions.share extensions share 6 extensions.extdiff extensions extdiff</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Split-Ini -Path C:\Users\rspektor\mercurial.ini -AsHashtable</dev:code> <dev:remarks> <maml:para>Given this INI file: [ui] username = Regina Spektor <regina@reginaspektor.com> [extensions] share = extdiff = `Split-Ini` returns the following hashtable: @{ ui.username = Carbon.Ini.IniNode ( FullName = 'ui.username'; Section = "ui"; Name = "username"; Value = "Regina Spektor <regina@reginaspektor.com>"; LineNumber = 2; ); extensions.share = Carbon.Ini.IniNode ( FullName = 'extensions.share'; Section = "extensions"; Name = "share" Value = ""; LineNumber = 5; ) extensions.extdiff = Carbon.Ini.IniNode ( FullName = 'extensions.extdiff'; Section = "extensions"; Name = "extdiff"; Value = ""; LineNumber = 6; ) }</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Split-Ini -Path C:\Users\rspektor\mercurial.ini -AsHashtable -CaseSensitive</dev:code> <dev:remarks> <maml:para>Demonstrates how to parse a case-sensitive INI file. Given this INI file: [ui] username = user@example.com USERNAME = user2example.com [UI] username = user3@example.com</maml:para> <maml:para> `Split-Ini -CaseSensitive` returns the following hashtable: @{ ui.username = Carbon.Ini.IniNode ( FullName = 'ui.username'; Section = "ui"; Name = "username"; Value = "user@example.com"; LineNumber = 2; ); ui.USERNAME = Carbon.Ini.IniNode ( FullName = 'ui.USERNAME'; Section = "ui"; Name = "USERNAME"; Value = "user2@example.com"; LineNumber = 3; ); UI.username = Carbon.Ini.IniNode ( FullName = 'UI.username'; Section = "UI"; Name = "username"; Value = "user3@example.com"; LineNumber = 6; ); }</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Set-IniEntry</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Remove-IniEntry</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Start-DscPullConfiguration</command:name> <maml:description> <maml:para>Performs a configuration check on a computer that is using DSC's Pull refresh mode.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Start</command:verb> <command:noun>DscPullConfiguration</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The most frequently a computer's LCM will download new configuration is every 15 minutes; the most frequently it will apply it is every 30 minutes. This function contacts a computer's LCM and tells it to apply and download its configuration immediately. If a computer's LCM isn't configured to pull its configuration, an error is written, and nothing happens. If a configuration check fails, the errors are retrieved from the computer's event log and written out as errors. The `Remote Event Log Management` firewall rules must be enabled on the computer for this to work. If they aren't, you'll see an error explaining this. The `Get-DscError` help topic shows how to enable these firewall rules. Sometimes, the LCM does a really crappy job of updating to the latest version of a module. `Start-DscPullConfiguration` will delete modules on the target computers. Specify the names of the modules to delete with the `ModuleName` parameter. Make sure you only delete modules that will get installed by the LCM. Only modules installed in the `$env:ProgramFiles\WindowsPowerShell\Modules` directory are removed.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Start-DscPullConfiguration</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The credential to use when connecting to the target computer.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Credential</maml:name> <maml:description> <maml:para>The credentials to use when connecting to the computers.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ModuleName</maml:name> <maml:description> <maml:para>Any modules that should be removed from the target computer's PSModulePath (since the LCM does a *really* crappy job of removing them).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Start-DscPullConfiguration</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CimSession</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">CimSession[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ModuleName</maml:name> <maml:description> <maml:para>Any modules that should be removed from the target computer's PSModulePath (since the LCM does a *really* crappy job of removing them).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The credential to use when connecting to the target computer.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Credential</maml:name> <maml:description> <maml:para>The credentials to use when connecting to the computers.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ModuleName</maml:name> <maml:description> <maml:para>Any modules that should be removed from the target computer's PSModulePath (since the LCM does a *really* crappy job of removing them).</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CimSession</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">CimSession[]</command:parameterValue> <dev:type> <maml:name>CimSession[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Start-DscPullConfiguration -ComputerName '10.1.2.3','10.4.5.6'</dev:code> <dev:remarks> <maml:para>Demonstrates how to immedately download and apply a computer from its pull server.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Start-DscPullConfiguration -ComputerName '10.1.2.3' -Credential (Get-Credential domain\username)</dev:code> <dev:remarks> <maml:para>Demonstrates how to use custom credentials to contact the remote server.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Start-DscPullConfiguration -CimSession $session</dev:code> <dev:remarks> <maml:para>Demonstrates how to use one or more CIM sessions to invoke a configuration check.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Start-DScPullConfiguration -ComputerName 'example.com' -ModuleName 'Carbon'</dev:code> <dev:remarks> <maml:para>Demonstrates how to delete modules on the target computers, because sometimes the LCM does a really crappy job of it.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-DscError</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Initialize-Lcm</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-DscWinEvent</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-AdminPrivilege</command:name> <maml:description> <maml:para>Checks if the current user is an administrator or has administrative privileges.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>AdminPrivilege</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Many tools, cmdlets, and APIs require administative privileges. Use this function to check. Returns `True` if the current user has administrative privileges, or `False` if he doesn't. Or she. Or it. This function handles UAC and computers where UAC is disabled.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-AdminPrivilege</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-AdminPrivilege</dev:code> <dev:remarks> <maml:para>Returns `True` if the current user has administrative privileges, or `False` if the user doesn't.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-DotNet</command:name> <maml:description> <maml:para>Tests if .NET is installed.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>DotNet</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Currently, this function only tests if .NET 2 or 4 is installed. Perhaps some friendly people out there will extend it to perform further checks?</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-DotNet</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>V2</maml:name> <maml:description> <maml:para>Test if .NET 2.0 is installed.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Test-DotNet</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>V4</maml:name> <maml:description> <maml:para>Test if .NET 4.0 is installed.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Full</maml:name> <maml:description> <maml:para>Test if the .NET 4 full profile is installed.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Test-DotNet</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>V4</maml:name> <maml:description> <maml:para>Test if .NET 4.0 is installed.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Client</maml:name> <maml:description> <maml:para>Test if hte .NET 4 client profile is installed.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>V2</maml:name> <maml:description> <maml:para>Test if .NET 2.0 is installed.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>V4</maml:name> <maml:description> <maml:para>Test if .NET 4.0 is installed.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Full</maml:name> <maml:description> <maml:para>Test if the .NET 4 full profile is installed.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Client</maml:name> <maml:description> <maml:para>Test if hte .NET 4 client profile is installed.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-DotNet -v2</dev:code> <dev:remarks> <maml:para>Demonstrates how to test if .NET 2 is installed.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-DotNet -v4 -Full</dev:code> <dev:remarks> <maml:para>Demonstrates how to test if the full .NET v4 is installed.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/kb/kbarticle.aspx?id=318785</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-DscTargetResource</command:name> <maml:description> <maml:para>Tests that all the properties on a resource and object are the same.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>DscTargetResource</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>DSC expects a resource's `Test-TargetResource` function to return `$false` if an object needs to be updated. Usually, you compare the current state of a resource with the desired state, and return `$false` if anything doesn't match. This function takes in a hashtable of the current resource's state (what's returned by `Get-TargetResource`) and compares it to the desired state (the values passed to `Test-TargetResource`). If any property in the target resource is different than the desired resource, a list of stale resources is written to the verbose stream and `$false` is returned. Here's a quick example: return Test-TargetResource -TargetResource (Get-TargetResource -Name 'fubar') -DesiredResource $PSBoundParameters -Target ('my resource ''fubar''') If you want to exclude properties from the evaluation, just remove them from the hashtable returned by `Get-TargetResource`: $resource = Get-TargetResource -Name 'fubar' $resource.Remove( 'PropertyThatDoesNotMatter' ) return Test-TargetResource -TargetResource $resource -DesiredResource $PSBoundParameters -Target ('my resource ''fubar''')</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-DscTargetResource</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>TargetResource</maml:name> <maml:description> <maml:para>The current state of the resource.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>DesiredResource</maml:name> <maml:description> <maml:para>The desired state of the resource. Properties not in this hashtable are skipped. Usually you'll pass `PSBoundParameters` from your `Test-TargetResource` function.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Target</maml:name> <maml:description> <maml:para>The a description of the target object being tested. Output in verbose messages.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>TargetResource</maml:name> <maml:description> <maml:para>The current state of the resource.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue> <dev:type> <maml:name>Hashtable</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>DesiredResource</maml:name> <maml:description> <maml:para>The desired state of the resource. Properties not in this hashtable are skipped. Usually you'll pass `PSBoundParameters` from your `Test-TargetResource` function.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue> <dev:type> <maml:name>Hashtable</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Target</maml:name> <maml:description> <maml:para>The a description of the target object being tested. Output in verbose messages.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.Boolean</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-TargetResource -TargetResource (Get-TargetResource -Name 'fubar') -DesiredResource $PSBoundParameters -Target ('my resource ''fubar''')</dev:code> <dev:remarks> <maml:para>Demonstrates how to test that all the properties on a DSC resource are the same was what's desired.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-FirewallStatefulFtp</command:name> <maml:description> <maml:para>Tests if the firewall's `StatefulFtp` setting is enabled.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>FirewallStatefulFtp</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns `True` if the firewall's `StatefulFtp` setting is enabled, `False` otherwise. If the firewall isn't configurable, writes an error and returns nothing, which will probably be interpreted by your script as `False`. Can't help you there. At least you'll get an error message.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-FirewallStatefulFtp</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-FirewallStatefulFtp</dev:code> <dev:remarks> <maml:para>Returns `True` if the firewall's `StatefulFtp` setting is enabled, `False` otherwise.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Assert-FirewallConfigurable</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-Group</command:name> <maml:description> <maml:para>Checks if a *local* group exists.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>Group</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses .NET's AccountManagement API to check if a *local* group exists. Returns `True` if the *local* account exists, or `False` if it doesn't.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-Group</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-Group -Name RebelAlliance</dev:code> <dev:remarks> <maml:para>Checks if the `RebelAlliance` *local* group exists. Returns `True` if it does, `False` if it doesn't.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-Group</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Install-Group</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Uninstall-Group</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-Identity</command:name> <maml:description> <maml:para>Tests that a name is a valid Windows local or domain user/group.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>Identity</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses the Windows `LookupAccountName` function to find an identity. If it can't be found, returns `$false`. Otherwise, it returns `$true`. Use the `PassThru` switch to return a `Carbon.Identity` object (instead of `$true` if the identity exists.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-Identity</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the identity to test.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PassThru</maml:name> <maml:description> <maml:para>Returns a `Carbon.Identity` object if the identity exists.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the identity to test.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PassThru</maml:name> <maml:description> <maml:para>Returns a `Carbon.Identity` object if the identity exists.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-Identity -Name 'Administrators</dev:code> <dev:remarks> <maml:para>Tests that a user or group called `Administrators` exists on the local computer.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-Identity -Name 'CARBON\Testers'</dev:code> <dev:remarks> <maml:para>Tests that a group called `Testers` exists in the `CARBON` domain.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-Identity -Name 'Tester' -PassThru</dev:code> <dev:remarks> <maml:para>Tests that a user or group named `Tester` exists and returns a `System.Security.Principal.SecurityIdentifier` object if it does.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Resolve-Identity</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-IisAppPool</command:name> <maml:description> <maml:para>Checks if an app pool exists.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>IisAppPool</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns `True` if an app pool with `Name` exists. `False` if it doesn't exist.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-IisAppPool</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-IisAppPool -Name Peanuts</dev:code> <dev:remarks> <maml:para>Returns `True` if the Peanuts app pool exists, `False` if it doesn't.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-IisConfigurationSection</command:name> <maml:description> <maml:para>Tests a configuration section.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>IisConfigurationSection</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>You can test if a configuration section exists or wheter it is locked.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-IisConfigurationSection</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SectionPath</maml:name> <maml:description> <maml:para>The path to the section to test.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the site whose configuration section to test. Optional. The default is the global configuration.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path under `SiteName` whose configuration section to test.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Test-IisConfigurationSection</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SectionPath</maml:name> <maml:description> <maml:para>The path to the section to test.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the site whose configuration section to test. Optional. The default is the global configuration.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path under `SiteName` whose configuration section to test.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Locked</maml:name> <maml:description> <maml:para>Test if the configuration section is locked.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SectionPath</maml:name> <maml:description> <maml:para>The path to the section to test.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The name of the site whose configuration section to test. Optional. The default is the global configuration.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path under `SiteName` whose configuration section to test.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Locked</maml:name> <maml:description> <maml:para>Test if the configuration section is locked.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-IisConfigurationSection -SectionPath 'system.webServer/I/Do/Not/Exist'</dev:code> <dev:remarks> <maml:para>Tests if a configuration section exists. Returns `False`, because the given configuration section doesn't exist.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-IisConfigurationSection -SectionPath 'system.webServer/cgi' -Locked</dev:code> <dev:remarks> <maml:para>Returns `True` if the global CGI section is locked. Otherwise `False`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-IisConfigurationSection -SectionPath 'system.webServer/security/authentication/basicAuthentication' -SiteName `Peanuts` -VirtualPath 'SopwithCamel' -Locked</dev:code> <dev:remarks> <maml:para>Returns `True` if the `Peanuts` website's `SopwithCamel` sub-directory's `basicAuthentication` security authentication section is locked. Otherwise, returns `False`.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-IisSecurityAuthentication</command:name> <maml:description> <maml:para>Tests if IIS authentication types are enabled or disabled on a site and/or virtual directory under that site.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>IisSecurityAuthentication</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>You can check if anonymous, basic, or Windows authentication are enabled. There are switches for each authentication type.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-IisSecurityAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Anonymous</maml:name> <maml:description> <maml:para>Tests if anonymous authentication is enabled.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Test-IisSecurityAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Basic</maml:name> <maml:description> <maml:para>Tests if basic authentication is enabled.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Test-IisSecurityAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Digest</maml:name> <maml:description> <maml:para>Tests if digest authentication is enabled.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Test-IisSecurityAuthentication</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Windows</maml:name> <maml:description> <maml:para>Tests if Windows authentication is enabled.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>SiteName</maml:name> <maml:description> <maml:para>The site where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>VirtualPath</maml:name> <maml:description> <maml:para>The optional path where anonymous authentication should be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Anonymous</maml:name> <maml:description> <maml:para>Tests if anonymous authentication is enabled.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Basic</maml:name> <maml:description> <maml:para>Tests if basic authentication is enabled.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Digest</maml:name> <maml:description> <maml:para>Tests if digest authentication is enabled.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Windows</maml:name> <maml:description> <maml:para>Tests if Windows authentication is enabled.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-IisSecurityAuthentication -SiteName Peanuts -Anonymous</dev:code> <dev:remarks> <maml:para>Returns `true` if anonymous authentication is enabled for the `Peanuts` site. `False` if it isn't.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-IisSecurityAuthentication -SiteName Peanuts -VirtualPath Doghouse -Basic</dev:code> <dev:remarks> <maml:para>Returns `true` if basic authentication is enabled for`Doghouse` directory under the `Peanuts` site. `False` if it isn't.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-IisWebsite</command:name> <maml:description> <maml:para>Tests if a website exists.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>IisWebsite</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns `True` if a website with name `Name` exists. `False` if it doesn't.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-IisWebsite</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-IisWebsite -Name 'Peanuts'</dev:code> <dev:remarks> <maml:para>Returns `True` if the `Peanuts` website exists. `False` if it doesn't.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-IPAddress</command:name> <maml:description> <maml:para>Tests that an IP address is in use on the local computer.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>IPAddress</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Sometimes its useful to know if an IP address is being used on the local computer. This function does just that.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-IPAddress</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>IPAddress</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>IPAddress</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue> <dev:type> <maml:name>IPAddress</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-IPAddress -IPAddress '10.1.2.3'</dev:code> <dev:remarks> <maml:para>Returns `true` if the IP address `10.1.2.3` is being used on the local computer.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-IPAddress -IPAddress '::1'</dev:code> <dev:remarks> <maml:para>Demonstrates that you can use IPv6 addresses.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-IPAddress -IPAddress ([Net.IPAddress]::Parse('10.5.6.7'))</dev:code> <dev:remarks> <maml:para>Demonstrates that you can use real `System.Net.IPAddress` objects.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Test-IPAddress</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-MsmqMessageQueue</command:name> <maml:description> <maml:para>Tests if an MSMQ message queue exists.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>MsmqMessageQueue</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns `True` if a message queue with name `Name` exists. `False` otherwise.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-MsmqMessageQueue</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The queue name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Private</maml:name> <maml:description> <maml:para>If the queue is private, this switch must be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The queue name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Private</maml:name> <maml:description> <maml:para>If the queue is private, this switch must be set.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-MsmqMessageQueue -Name 'MovieQueue'</dev:code> <dev:remarks> <maml:para>Returns `True` if public queue `MovieQueue` exists, `False` otherwise.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-MsmqMessageQueue -Name 'MovieCriticsQueue' -Private</dev:code> <dev:remarks> <maml:para>Returns `True` if private queue `MovieCriticsQueue` exists, `False` otherwise.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-NtfsCompression</command:name> <maml:description> <maml:para>Tests if NTFS compression is turned on.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>NtfsCompression</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns `$true` if compression is enabled, `$false` otherwise.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-NtfsCompression</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-NtfsCompression -Path C:\Projects\Carbon</dev:code> <dev:remarks> <maml:para>Returns `$true` if NTFS compression is enabled on `C:\Projects\CArbon`. If it is disabled, returns `$false`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Disable-NtfsCompression</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Enable-NtfsCompression</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-OSIs32Bit</command:name> <maml:description> <maml:para>Tests if the current operating system is 32-bit.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>OSIs32Bit</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Regardless of the bitness of the currently running process, returns `True` if the current OS is a 32-bit OS.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-OSIs32Bit</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-OSIs32Bit</dev:code> <dev:remarks> <maml:para>Returns `True` if the current operating system is 32-bit, and `False` otherwise.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.environment.is64bitoperatingsystem.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-OSIs64Bit</command:name> <maml:description> <maml:para>Tests if the current operating system is 64-bit.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>OSIs64Bit</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Regardless of the bitness of the currently running process, returns `True` if the current OS is a 64-bit OS.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-OSIs64Bit</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-OSIs64Bit</dev:code> <dev:remarks> <maml:para>Returns `True` if the current operating system is 64-bit, and `False` otherwise.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.environment.is64bitoperatingsystem.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-PathIsJunction</command:name> <maml:description> <maml:para>Tests if a path is a junction.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>PathIsJunction</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Tests if path is the path to a junction. If `Path` doesn't exist, returns false. The alternate way of doing this is to use the `IsJunction` extension method on `DirectoryInfo` objects, which are returned by the `Get-Item` and `Get-ChildItem` cmdlets.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-PathIsJunction</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-PathIsJunction -Path C:\I\Am\A\Junction</dev:code> <dev:remarks> <maml:para>Returns `True`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-PathIsJunction -Path C:\I\Am\Not\A\Junction</dev:code> <dev:remarks> <maml:para>Returns `False`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-ChildItem * | Where-Object { $_.PsIsContainer -and $_.IsJunction }</dev:code> <dev:remarks> <maml:para>Demonstrates an alternative way of testing for junctions. Uses Carbon's `IsJunction` extension method on the `DirectoryInfo` type to check if any directories under the current directory are junctions.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-PerformanceCounter</command:name> <maml:description> <maml:para>Tests if a performance counter exists.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>PerformanceCounter</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns `True` if counter `Name` exists in category `CategoryName`. `False` if it does not exist or the category doesn't exist.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-PerformanceCounter</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>CategoryName</maml:name> <maml:description> <maml:para>The category's name where the performance counter exists. Or might exist. As the case may be.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Name</maml:name> <maml:description> <maml:para>The performance counter's name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>CategoryName</maml:name> <maml:description> <maml:para>The category's name where the performance counter exists. Or might exist. As the case may be.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Name</maml:name> <maml:description> <maml:para>The performance counter's name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-PerformanceCounter -CategoryName 'ToyotaCamry' -Name 'MilesPerGallon'</dev:code> <dev:remarks> <maml:para>Returns `True` if the `ToyotaCamry` performance counter category has a `MilesPerGallon` counter. `False` if the counter doesn't exist.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-PerformanceCounterCategory</command:name> <maml:description> <maml:para>Tests if a performance counter category exists.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>PerformanceCounterCategory</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns `True` if category `CategoryName` exists. `False` if it does not exist.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-PerformanceCounterCategory</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>CategoryName</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>CategoryName</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-PerformanceCounterCategory -CategoryName 'ToyotaCamry'</dev:code> <dev:remarks> <maml:para>Returns `True` if the `ToyotaCamry` performance counter category exists. `False` if the category doesn't exist.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-Permission</command:name> <maml:description> <maml:para>Tests if permissions are set on a file, directory, registry key, or certificate's private key/key container.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>Permission</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Sometimes, you don't want to use `Grant-Permission` on a big tree. In these situations, use `Test-Permission` to see if permissions are set on a given path. This function supports file system, registry, and certificate private key/key container permissions. You can also test the inheritance and propogation flags on containers, in addition to the permissions, with the `ApplyTo` parameter. See [Grant-Permission](Grant-Permission.html) documentation for an explanation of the `ApplyTo` parameter. Inherited permissions on *not* checked by default. To check inherited permission, use the `-Inherited` switch. By default, the permission check is not exact, i.e. the user may have additional permissions to what you're checking. If you want to make sure the user has *exactly* the permission you want, use the `-Exact` switch. Please note that by default, NTFS will automatically add/grant `Synchronize` permission on an item, which is handled by this function. When checking for permissions on certificate private keys/key containers, if a certificate doesn't have a private key, `$true` is returned.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-Permission</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path on which the permissions should be checked. Can be a file system or registry path.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The user or group whose permissions to check.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Permission</maml:name> <maml:description> <maml:para>The permission to test for: e.g. FullControl, Read, etc. For file system items, use values from [System.Security.AccessControl.FileSystemRights](http://m sdn.microsoft.com/en-us/library/system.security.accesscontrol.filesystemrights.a spx). For registry items, use values from [System.Security.AccessControl.Regist ryRights](http://msdn.microsoft.com/en-us/library/system.security.accesscontrol. registryrights.aspx).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>ApplyTo</maml:name> <maml:description> <maml:para>The container and inheritance flags to check. Ignored if `Path` is a file. These are ignored if not supplied. See `Grant-Permission` for detailed explanation of this parameter. This controls the inheritance and propagation flags. Default is full inheritance, e.g. `ContainersAndSubContainersAndLeaves`. This parameter is ignored if `Path` is to a leaf item.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">ContainerInheritanceFlags</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Inherited</maml:name> <maml:description> <maml:para>Include inherited permissions in the check.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Exact</maml:name> <maml:description> <maml:para>Check for the exact permissions, inheritance flags, and propagation flags, i.e. make sure the identity has *only* the permissions you specify.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path on which the permissions should be checked. Can be a file system or registry path.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The user or group whose permissions to check.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2"> <maml:name>Permission</maml:name> <maml:description> <maml:para>The permission to test for: e.g. FullControl, Read, etc. For file system items, use values from [System.Security.AccessControl.FileSystemRights](http://m sdn.microsoft.com/en-us/library/system.security.accesscontrol.filesystemrights.a spx). For registry items, use values from [System.Security.AccessControl.Regist ryRights](http://msdn.microsoft.com/en-us/library/system.security.accesscontrol. registryrights.aspx).</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3"> <maml:name>ApplyTo</maml:name> <maml:description> <maml:para>The container and inheritance flags to check. Ignored if `Path` is a file. These are ignored if not supplied. See `Grant-Permission` for detailed explanation of this parameter. This controls the inheritance and propagation flags. Default is full inheritance, e.g. `ContainersAndSubContainersAndLeaves`. This parameter is ignored if `Path` is to a leaf item.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">ContainerInheritanceFlags</command:parameterValue> <dev:type> <maml:name>ContainerInheritanceFlags</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Inherited</maml:name> <maml:description> <maml:para>Include inherited permissions in the check.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Exact</maml:name> <maml:description> <maml:para>Check for the exact permissions, inheritance flags, and propagation flags, i.e. make sure the identity has *only* the permissions you specify.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-Permission -Identity 'STARFLEET\JLPicard' -Permission 'FullControl' -Path 'C:\Enterprise\Bridge'</dev:code> <dev:remarks> <maml:para>Demonstrates how to check that Jean-Luc Picard has `FullControl` permission on the `C:\Enterprise\Bridge`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-Permission -Identity 'STARFLEET\GLaForge' -Permission 'WriteKey' -Path 'HKLM:\Software\Enterprise\Engineering'</dev:code> <dev:remarks> <maml:para>Demonstrates how to check that Geordi LaForge can write registry keys at `HKLM:\Software\Enterprise\Engineering`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-Permission -Identity 'STARFLEET\Worf' -Permission 'Write' -ApplyTo 'Container' -Path 'C:\Enterprise\Brig'</dev:code> <dev:remarks> <maml:para>Demonstrates how to test for inheritance/propogation flags, in addition to permissions.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-Permission -Identity 'STARFLEET\Data' -Permission 'GenericWrite' -Path 'cert:\LocalMachine\My\1234567890ABCDEF1234567890ABCDEF12345678'</dev:code> <dev:remarks> <maml:para>Demonstrates how to test for permissions on a certificate's private key/key container. If the certificate doesn't have a private key, returns `$true`.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Carbon_Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>ConvertTo-ContainerInheritanceFlags</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Protect-Acl</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Revoke-Permission</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.filesystemrights.aspx</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.registryrights.aspx</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.cryptokeyrights.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-PowerShellIs32Bit</command:name> <maml:description> <maml:para>Tests if the current PowerShell process is 32-bit.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>PowerShellIs32Bit</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns `True` if the currently executing PowerShell process is 32-bit/x86, `False` if it is 64-bit/x64.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-PowerShellIs32Bit</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-PowerShellIs32Bit</dev:code> <dev:remarks> <maml:para>Returns `True` if PowerShell is 32-bit/x86, `False` if it is 64-bit/x64.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.environment.is64bitprocess.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-PowerShellIs64Bit</command:name> <maml:description> <maml:para>Tests if the current PowerShell process is 64-bit/x64.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>PowerShellIs64Bit</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns `True` if the currently executing PowerShell process is 64-bit/x64, `False` if it is 32-bit/x86.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-PowerShellIs64Bit</maml:name> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-PowerShellIs64Bit</dev:code> <dev:remarks> <maml:para>Returns `True` if PowerShell is 64-bit/x64, `False` if it is 32-bit/x86.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.environment.is64bitprocess.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-Privilege</command:name> <maml:description> <maml:para>Tests if an identity has a given privilege.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>Privilege</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Returns `true` if an identity has a privilege. `False` otherwise.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-Privilege</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity whose privileges to check.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Privilege</maml:name> <maml:description> <maml:para>The privilege to check.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Identity</maml:name> <maml:description> <maml:para>The identity whose privileges to check.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Privilege</maml:name> <maml:description> <maml:para>The privilege to check.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-Privilege -Identity Forrester -Privilege SeServiceLogonRight</dev:code> <dev:remarks> <maml:para>Tests if `Forrester` has the `SeServiceLogonRight` privilege.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Carbon_Privilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-Privilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Grant-Privilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Revoke-Privilege</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-RegistryKeyValue</command:name> <maml:description> <maml:para>Tests if a registry value exists.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>RegistryKeyValue</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The usual ways for checking if a registry value exists don't handle when a value simply has an empty or null value. This function actually checks if a key has a value with a given name.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-RegistryKeyValue</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the registry key where the value should be set. Will be created if it doesn't exist.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the value being set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to the registry key where the value should be set. Will be created if it doesn't exist.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the value being set.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-RegistryKeyValue -Path 'hklm:\Software\Carbon\Test' -Name 'Title'</dev:code> <dev:remarks> <maml:para>Returns `True` if `hklm:\Software\Carbon\Test` contains a value named 'Title'. `False` otherwise.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-ScheduledTask</command:name> <maml:description> <maml:para>Tests if a scheduled task exists on the current computer.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>ScheduledTask</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The `Test-ScheduledTask` function uses `schtasks.exe` to tests if a task with a given name exists on the current computer. If it does, `$true` is returned. Otherwise, `$false` is returned. This name must be the *full task name*, i.e. the task's path/location and its name.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-ScheduledTask</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.Boolean</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-ScheduledTask -Name 'AutoUpdateMyApp'</dev:code> <dev:remarks> <maml:para>Demonstrates how to test if a scheduled tasks exists.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-ScheduledTask</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-Service</command:name> <maml:description> <maml:para>Tests if a service exists, without writing anything out to the error stream.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>Service</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>`Get-Service` writes an error when a service doesn't exist. This function tests if a service exists without writing anyting to the output stream.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-Service</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-Service -Name 'Drive'</dev:code> <dev:remarks> <maml:para>Returns `true` if the `Drive` service exists. `False` otherwise.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Carbon_Service</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Install-Service</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Uninstall-Service</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-SslCertificateBinding</command:name> <maml:description> <maml:para>Tests if an SSL certificate binding exists.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>SslCertificateBinding</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>SSL certificates are bound to IP addresses and ports. This function tests if one exists on a given IP address/port.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-SslCertificateBinding</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>IPAddress</maml:name> <maml:description> <maml:para>The IP address to test for an SSL certificate.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">IPAddress</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Port</maml:name> <maml:description> <maml:para>The port to test for an SSL certificate.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">UInt16</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>IPAddress</maml:name> <maml:description> <maml:para>The IP address to test for an SSL certificate.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">IPAddress</command:parameterValue> <dev:type> <maml:name>IPAddress</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1"> <maml:name>Port</maml:name> <maml:description> <maml:para>The port to test for an SSL certificate.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">UInt16</command:parameterValue> <dev:type> <maml:name>UInt16</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-SslCertificateBinding -Port 443</dev:code> <dev:remarks> <maml:para>Tests if there is a default SSL certificate bound to all a machine's IP addresses on port 443.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-SslCertificateBinding -IPAddress 10.0.1.1 -Port 443</dev:code> <dev:remarks> <maml:para>Tests if there is an SSL certificate bound to IP address 10.0.1.1 on port 443.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-SslCertificateBinding</dev:code> <dev:remarks> <maml:para>Tests if there are any SSL certificates bound to any IP address/port on the machine.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-UncPath</command:name> <maml:description> <maml:para>Tests if a path is a UNC path.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>UncPath</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Converts the path to a URI and returns the value of its `IsUnc` property. This function does not test if path exists. Use `Test-Path` for that.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-UncPath</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-UncPath -Path '\\computer\share'</dev:code> <dev:remarks> <maml:para>Returns `true` since `\\computer\share` is a UNC path. Note that `Test-UncPath` does not have to exist.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-UncPath -Path 'C:\Windows'</dev:code> <dev:remarks> <maml:para>Returns `false` since `C:\Windows` is not a UNC path.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Test-Path</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://blogs.microsoft.co.il/blogs/ScriptFanatic//archive/2010/05/27/quicktip-how-to-validate-a-unc-path.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-User</command:name> <maml:description> <maml:para>Checks if a *local* user account exists.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>User</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses .NET's AccountManagement API to check if a *local* user account exists. Returns `True` if the *local* account exists, or `False` if it doesn't.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-User</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Username</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Username</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-User -Username HSolo</dev:code> <dev:remarks> <maml:para>Checks if the HSolo *local* account exists. Returns `True` if it does, `False` if it doesn't or its encased in carbonite.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-User</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Install-User</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Uninstall-User</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-WindowsFeature</command:name> <maml:description> <maml:para>Tests if an optional Windows component exists and, optionally, if it is installed.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>WindowsFeature</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Feature names are different across different versions of Windows. This function tests if a given feature exists. You can also test if a feature is installed by setting the `Installed` switch. Feature names are case-sensitive and are different between different versions of Windows. For a list, on Windows 2008, run `serveramanagercmd.exe -q`; on Windows 7, run `Get-WmiObject -Class Win32_OptionalFeature | Select-Object Name`. On Windows 8/2012, use `Get-WindowsFeature`.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-WindowsFeature</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the feature to test. Feature names are case-sensitive and are different between different versions of Windows. For a list, on Windows 2008, run `serveramanagercmd.exe -q`; on Windows 7, run `Get-WmiObject -Class Win32_OptionalFeature | Select-Object Name`. On Windows 8/2012, use `Get-WindowsFeature`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Installed</maml:name> <maml:description> <maml:para>Test if the service is installed in addition to if it exists.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the feature to test. Feature names are case-sensitive and are different between different versions of Windows. For a list, on Windows 2008, run `serveramanagercmd.exe -q`; on Windows 7, run `Get-WmiObject -Class Win32_OptionalFeature | Select-Object Name`. On Windows 8/2012, use `Get-WindowsFeature`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Installed</maml:name> <maml:description> <maml:para>Test if the service is installed in addition to if it exists.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-WindowsFeature -Name MSMQ-Server</dev:code> <dev:remarks> <maml:para>Tests if the MSMQ-Server feature exists on the current computer.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-WindowsFeature -Name IIS-WebServer -Installed</dev:code> <dev:remarks> <maml:para>Tests if the IIS-WebServer features exists and is installed/enabled.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-WindowsFeature</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Install-WindowsFeature</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Uninstall-WindowsFeature</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Test-ZipFile</command:name> <maml:description> <maml:para>Tests if a file is a ZIP file using the `DotNetZip` library.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Test</command:verb> <command:noun>ZipFile</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses the `Ionic.Zip.ZipFile.IsZipFile` static method to determine if a file is a ZIP file. The file *must* exist. If it doesn't, an error is written and `$null` is returned. You can pipe `System.IO.FileInfo` (or strings) to this function to filter multiple items.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Test-ZipFile</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Path</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.Boolean</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Test-ZipFile -Path 'MyCoolZip.zip'</dev:code> <dev:remarks> <maml:para>Demonstrates how to check the current directory if MyCoolZip.zip is really a ZIP file.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Online version:</maml:linkText> <maml:uri>https://www.nuget.org/packages/DotNetZip</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Compress-Item</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Expand-Item</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Uninstall-Certificate</command:name> <maml:description> <maml:para>Removes a certificate from a store for the user or machine account.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Uninstall</command:verb> <command:noun>Certificate</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Uses .NET's certificates API to remove a certificate from a given store for the machine or current user. Use the thumbprint or friendly name to identify which certificate to remove. The thumbprint is unique to each certificate. Friendly names are not guaranteed to be unique. The user performing the removal must have permission on the store where the certificate is located.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Uninstall-Certificate</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Thumbprint</maml:name> <maml:description> <maml:para>The thumbprint of the certificate to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CustomStoreName</maml:name> <maml:description> <maml:para>The name of the non-standard, custom store where the certificate should be un-installed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Uninstall-Certificate</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Thumbprint</maml:name> <maml:description> <maml:para>The thumbprint of the certificate to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreName</maml:name> <maml:description> <maml:para>The name of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreName</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Uninstall-Certificate</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Certificate</maml:name> <maml:description> <maml:para>The certificate to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">X509Certificate2</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CustomStoreName</maml:name> <maml:description> <maml:para>The name of the non-standard, custom store where the certificate should be un-installed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Uninstall-Certificate</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Certificate</maml:name> <maml:description> <maml:para>The certificate to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">X509Certificate2</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreName</maml:name> <maml:description> <maml:para>The name of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreName</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Thumbprint</maml:name> <maml:description> <maml:para>The thumbprint of the certificate to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreLocation</maml:name> <maml:description> <maml:para>The location of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreLocation</command:parameterValue> <dev:type> <maml:name>StoreLocation</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>CustomStoreName</maml:name> <maml:description> <maml:para>The name of the non-standard, custom store where the certificate should be un-installed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StoreName</maml:name> <maml:description> <maml:para>The name of the certificate's store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">StoreName</command:parameterValue> <dev:type> <maml:name>StoreName</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Certificate</maml:name> <maml:description> <maml:para>The certificate to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">X509Certificate2</command:parameterValue> <dev:type> <maml:name>X509Certificate2</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>></maml:para> </maml:introduction> <dev:code>Uninstall-Certificate -Thumbprint 570895470234023dsaaefdbcgbefa -StoreLocation CurrentUser -StoreName My</dev:code> <dev:remarks> <maml:para>Removes the 570895470234023dsaaefdbcgbefa certificate from the current user's Personal certificate store.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>></maml:para> </maml:introduction> <dev:code>$cert = Get-Certificate -FriendlyName 'Carbon Testing Certificate' -StoreLocation LocalMachine -StoreName Root</dev:code> <dev:remarks> <maml:para>> Uninstall-Certificate -Certificate $cert -StoreLocation LocalMachine -StoreName Root Removes the certificate with friendly name 'Carbon Testing Certificate' from the local machine's Trusted Root Certification Authorities store.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Uninstall-Certificate -Thumbprint 570895470234023dsaaefdbcgbefa -StoreLocation LocalMachine -StoreName 'SharePoint'</dev:code> <dev:remarks> <maml:para>Demonstrates how to uninstall a certificate from a custom, non-standard store.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Uninstall-IisAppPool</command:name> <maml:description> <maml:para>Removes an IIS application pool.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Uninstall</command:verb> <command:noun>IisAppPool</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>If the app pool doesn't exist, nothing happens.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Uninstall-IisAppPool</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the app pool to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the app pool to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Uninstall-IisAppPool -Name Batcave</dev:code> <dev:remarks> <maml:para>Removes/uninstalls the `Batcave` app pool.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Uninstall-IisWebsite</command:name> <maml:description> <maml:para>Removes a website</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Uninstall</command:verb> <command:noun>IisWebsite</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Pretty simple: removes the website named `Name`. If no website with that name exists, nothing happens.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Uninstall-IisWebsite</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Uninstall-IisWebsite -Name 'MyWebsite'</dev:code> <dev:remarks> <maml:para>Removes MyWebsite.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Uninstall-IisWebsite 1</dev:code> <dev:remarks> <maml:para>Removes the website whose ID is 1.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-IisWebsite</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Install-IisWebsite</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Uninstall-MsmqMessageQueue</command:name> <maml:description> <maml:para>Removes an MSMQ queue.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Uninstall</command:verb> <command:noun>MsmqMessageQueue</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Removes/deletes an existing MSMQ queue by name. If a queue with that name doesn't exist, nothing happens.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Uninstall-MsmqMessageQueue</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the queue to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Private</maml:name> <maml:description> <maml:para>Is this a private queue?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the queue to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Private</maml:name> <maml:description> <maml:para>Is this a private queue?</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Uninstall-MsmqMessageQueue -Name MovieQueue</dev:code> <dev:remarks> <maml:para>Removes the public `MovieQueue` queue.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Uninstall-MsmqMessageQueue -Name MovieCriticsQueue -Private</dev:code> <dev:remarks> <maml:para>Removes the private `MovieCriticsQueue` queue.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Uninstall-PerformanceCounterCategory</command:name> <maml:description> <maml:para>Removes an entire performance counter category.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Uninstall</command:verb> <command:noun>PerformanceCounterCategory</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Removes, with extreme prejudice, the performance counter category `CategoryName`. All its performance counters are also deleted. If the performance counter category doesn't exist, nothing happens. I hope you have good backups!</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Uninstall-PerformanceCounterCategory</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>CategoryName</maml:name> <maml:description> <maml:para>The performance counter's category name that should be deleted.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>CategoryName</maml:name> <maml:description> <maml:para>The performance counter's category name that should be deleted.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Uninstall-PerformanceCounterCategory -CategoryName 'ToyotaCamry'</dev:code> <dev:remarks> <maml:para>Removes the `ToyotaCamry` performance counter category and all its performance counters. So sad!</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Uninstall-ScheduledTask</command:name> <maml:description> <maml:para>Uninstalls a scheduled task on the current computer.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Uninstall</command:verb> <command:noun>ScheduledTask</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The `Uninstall-ScheduledTask` function uses `schtasks.exe` to uninstall a scheduled task on the current computer. If the task doesn't exist, nothing happens.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Uninstall-ScheduledTask</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para></maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Uninstall-ScheduledTask -Name 'doc'</dev:code> <dev:remarks> <maml:para>Demonstrates how to delete a scheduled task named `doc`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Uninstall-ScheduledTask -Name 'doc' -Force</dev:code> <dev:remarks> <maml:para>Demonstrates how to delete a scheduled task that is currently running.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-ScheduledTask</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-ScheduledTask</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Install-ScheduledTask</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Uninstall-Service</command:name> <maml:description> <maml:para>Removes/deletes a service.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Uninstall</command:verb> <command:noun>Service</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Removes an existing Windows service. If the service doesn't exist, nothing happens. The service is stopped before being deleted, so that the computer doesn't need to be restarted for the removal to complete. Even then, sometimes it won't go away until a reboot. I don't get it either.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Uninstall-Service</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The service name to delete.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>The service name to delete.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Uninstall-Service -Name DeathStar</dev:code> <dev:remarks> <maml:para>Removes the Death Star Windows service. It is destro..., er, stopped first, then destro..., er, deleted. If only the rebels weren't using Linux!</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Carbon_Service</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Install-Service</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Uninstall-User</command:name> <maml:description> <maml:para>Removes a user from the local computer.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Uninstall</command:verb> <command:noun>User</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Removes a *local* user account. If the account doesn't exist, nothing happens.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Uninstall-User</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Username</maml:name> <maml:description> <maml:para>The username of the account to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>Username</maml:name> <maml:description> <maml:para>The username of the account to remove.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Uninstall-User -Username WTarkin</dev:code> <dev:remarks> <maml:para>Removes the `WTarkin` *local* user account.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-User</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Install-User</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-User</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Uninstall-User</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Uninstall-WindowsFeature</command:name> <maml:description> <maml:para>Uninstalls optional Windows components/features.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Uninstall</command:verb> <command:noun>WindowsFeature</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The names of the features are different on different versions of Windows. For a list, run `Get-WindowsService`. Feature names are case-sensitive. If a feature is already uninstalled, nothing happens. **This function is not available on Windows 8/2012.**</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Uninstall-WindowsFeature</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The names of the components to uninstall/disable. Feature names are case-sensitive. To get a list, run `Get-WindowsFeature`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Uninstall-WindowsFeature</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Iis</maml:name> <maml:description> <maml:para>Uninstalls IIS.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IisHttpRedirection</maml:name> <maml:description> <maml:para>Uninstalls IIS's HTTP redirection feature.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Msmq</maml:name> <maml:description> <maml:para>Uninstalls MSMQ.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MsmqHttpSupport</maml:name> <maml:description> <maml:para>Uninstalls MSMQ HTTP support.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MsmqActiveDirectoryIntegration</maml:name> <maml:description> <maml:para>Uninstalls MSMQ Active Directory Integration.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>The names of the components to uninstall/disable. Feature names are case-sensitive. To get a list, run `Get-WindowsFeature`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Iis</maml:name> <maml:description> <maml:para>Uninstalls IIS.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IisHttpRedirection</maml:name> <maml:description> <maml:para>Uninstalls IIS's HTTP redirection feature.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Msmq</maml:name> <maml:description> <maml:para>Uninstalls MSMQ.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MsmqHttpSupport</maml:name> <maml:description> <maml:para>Uninstalls MSMQ HTTP support.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MsmqActiveDirectoryIntegration</maml:name> <maml:description> <maml:para>Uninstalls MSMQ Active Directory Integration.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Uninstall-WindowsFeature -Name TelnetClient,TFTP</dev:code> <dev:remarks> <maml:para>Uninstalls Telnet and TFTP.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Uninstall-WindowsFeature -Iis</dev:code> <dev:remarks> <maml:para>Uninstalls IIS.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-WindowsFeature</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Install-WindowsService</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Test-WindowsService</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Unlock-IisConfigurationSection</command:name> <maml:description> <maml:para>Unlocks a section in the IIS server configuration.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Unlock</command:verb> <command:noun>IisConfigurationSection</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Some sections/areas are locked by IIS, so that websites can't enable those settings, or have their own custom configurations. This function will unlocks those locked sections. You have to know the path to the section. You can see a list of locked sections by running: C:\Windows\System32\inetsrv\appcmd.exe unlock config /section:?</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Unlock-IisConfigurationSection</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SectionPath</maml:name> <maml:description> <maml:para>The path to the section to unlock. For a list of sections, run C:\Windows\System32\inetsrv\appcmd.exe unlock config /section:?</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0"> <maml:name>SectionPath</maml:name> <maml:description> <maml:para>The path to the section to unlock. For a list of sections, run C:\Windows\System32\inetsrv\appcmd.exe unlock config /section:?</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Unlock-IisConfigSection -Name 'system.webServer/cgi'</dev:code> <dev:remarks> <maml:para>Unlocks the CGI section so that websites can configure their own CGI settings.</maml:para> </dev:remarks> </command:example> </command:examples> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Unprotect-String</command:name> <maml:description> <maml:para>Decrypts a string.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Unprotect</command:verb> <command:noun>String</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>Decrypts a string encrypted via the Data Protection API (DPAPI) or RSA. ## DPAPI This is the default. The string must have also been encrypted with the DPAPI. The string must have been encrypted at the current user's scope or the local machien scope. ## RSA RSA is an assymetric encryption/decryption algorithm, which requires a public/private key pair. This method decrypts a secret that was encrypted with the public key using the private key. You can specify the private key in three ways: * with a `System.Security.Cryptography.X509Certificates.X509Certificate2` object, via the `Certificate` parameter * with a certificate in one of the Windows certificate stores, passing its unique thumbprint via the `Thumbprint` parameter, or via the `PrivateKeyPath` parameter, which can be a certificat provider path, e.g. it starts with `cert:\`. * with an X509 certificate file, via the `PrivateKeyPath` parameter</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Unprotect-String</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>ProtectedString</maml:name> <maml:description> <maml:para>The text to decrypt.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Unprotect-String</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>ProtectedString</maml:name> <maml:description> <maml:para>The text to decrypt.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Certificate</maml:name> <maml:description> <maml:para>The private key to use for decrypting.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">X509Certificate2</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UseDirectEncryptionPadding</maml:name> <maml:description> <maml:para>If true, uses Direct Encryption (PKCS#1 v1.5) padding. Otherwise (the default), uses OAEP (PKCS#1 v2) padding. See [Encrypt](http://msdn.microsoft.com/en-us/lib rary/system.security.cryptography.rsacryptoserviceprovider.encrypt(v=vs.110).asp x) for information.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Unprotect-String</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>ProtectedString</maml:name> <maml:description> <maml:para>The text to decrypt.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Thumbprint</maml:name> <maml:description> <maml:para>The thumbprint of the certificate, found in one of the Windows certificate stores, to use when decrypting. All certificate stores are searched. The current user must have permission to the private key.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UseDirectEncryptionPadding</maml:name> <maml:description> <maml:para>If true, uses Direct Encryption (PKCS#1 v1.5) padding. Otherwise (the default), uses OAEP (PKCS#1 v2) padding. See [Encrypt](http://msdn.microsoft.com/en-us/lib rary/system.security.cryptography.rsacryptoserviceprovider.encrypt(v=vs.110).asp x) for information.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Unprotect-String</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>ProtectedString</maml:name> <maml:description> <maml:para>The text to decrypt.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PrivateKeyPath</maml:name> <maml:description> <maml:para>The path to the private key to use for encrypting. Must be to an `X509Certificate2` file or a certificate in a certificate store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password for the private key, if it has one. It really should.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UseDirectEncryptionPadding</maml:name> <maml:description> <maml:para>If true, uses Direct Encryption (PKCS#1 v1.5) padding. Otherwise (the default), uses OAEP (PKCS#1 v2) padding. See [Encrypt](http://msdn.microsoft.com/en-us/lib rary/system.security.cryptography.rsacryptoserviceprovider.encrypt(v=vs.110).asp x) for information.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>ProtectedString</maml:name> <maml:description> <maml:para>The text to decrypt.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Certificate</maml:name> <maml:description> <maml:para>The private key to use for decrypting.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">X509Certificate2</command:parameterValue> <dev:type> <maml:name>X509Certificate2</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UseDirectEncryptionPadding</maml:name> <maml:description> <maml:para>If true, uses Direct Encryption (PKCS#1 v1.5) padding. Otherwise (the default), uses OAEP (PKCS#1 v2) padding. See [Encrypt](http://msdn.microsoft.com/en-us/lib rary/system.security.cryptography.rsacryptoserviceprovider.encrypt(v=vs.110).asp x) for information.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Thumbprint</maml:name> <maml:description> <maml:para>The thumbprint of the certificate, found in one of the Windows certificate stores, to use when decrypting. All certificate stores are searched. The current user must have permission to the private key.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PrivateKeyPath</maml:name> <maml:description> <maml:para>The path to the private key to use for encrypting. Must be to an `X509Certificate2` file or a certificate in a certificate store.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Password</maml:name> <maml:description> <maml:para>The password for the private key, if it has one. It really should.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <!-- Inputs--> <command:inputType> <dev:type> <maml:name>System.String</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>PS></maml:para> </maml:introduction> <dev:code>$password = Unprotect-String -ProtectedString $encryptedPassword</dev:code> <dev:remarks> <maml:para>Decrypts a protected string which was encrypted at the current user or default scopes using the DPAPI. The secret must have been encrypted at the current user's scope or at the local computer's scope.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Protect-String -String 'NotSoSecretSecret' -ForUser | Unprotect-String</dev:code> <dev:remarks> <maml:para>Demonstrates how Unprotect-String takes input from the pipeline. Adds 'NotSoSecretSecret' to the pipeline.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Unprotect-String -ProtectedString $ciphertext -Certificate $myCert</dev:code> <dev:remarks> <maml:para>Demonstrates how to encrypt a secret using RSA with a `System.Security.Cryptography.X509Certificates.X509Certificate2` object. You're responsible for creating/loading it. The `New-RsaKeyPair` function will create a key pair for you, if you've got a Windows SDK installed.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Unprotect-String -ProtectedString $ciphertext -Thumbprint '44A7C27F3353BC53F82318C14490D7E2500B6D9E'</dev:code> <dev:remarks> <maml:para>Demonstrates how to decrypt a secret using RSA with a certificate in one of the Windows certificate stores. All local machine and user stores are searched. The current user must have permission/access to the certificate's private key.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Unprotect -ProtectedString $ciphertext -PrivateKeyPath 'C:\Projects\Security\publickey.cer'</dev:code> <dev:remarks> <maml:para>Demonstrates how to encrypt a secret using RSA with a certificate file. The file must be loadable by the `System.Security.Cryptography.X509Certificates.X509Certificate` class.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 6 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Unprotect -ProtectedString $ciphertext -PrivateKeyPath 'cert:\LocalMachine\My\44A7C27F3353BC53F82318C14490D7E2500B6D9E'</dev:code> <dev:remarks> <maml:para>Demonstrates how to encrypt a secret using RSA with a certificate in the store, giving its exact path.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>New-RsaKeyPair</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Protect-String</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> <maml:uri>http://msdn.microsoft.com/en-us/library/system.security.cryptography.protecteddata.aspx</maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <!-- Command--> <command:details> <command:name>Write-DscError</command:name> <maml:description> <maml:para>Writes DSC errors out as errors.</maml:para> </maml:description> <maml:copyright> <maml:para></maml:para> </maml:copyright> <command:verb>Write</command:verb> <command:noun>DscError</command:noun> <dev:version/> </command:details> <maml:description> <maml:para>The Local Configuration Manager (LCM) applies configuration in a separate process space as a background service which writes its errors to the `Microsoft-Windows-DSC/Operational` event log. This function is intended to be used with `Get-DscError`, and will write errors returned by that function as PowerShell errors.</maml:para> </maml:description> <command:syntax> <!-- Parameter Sets--> <command:syntaxItem> <maml:name>Write-DscError</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>EventLogRecord</maml:name> <maml:description> <maml:para>The error record to write out as an error.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">EventLogRecord[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PassThru</maml:name> <maml:description> <maml:para>Return the event log record after writing an error.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- All Parameters--> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="0"> <maml:name>EventLogRecord</maml:name> <maml:description> <maml:para>The error record to write out as an error.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">EventLogRecord[]</command:parameterValue> <dev:type> <maml:name>EventLogRecord[]</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> <maml:name>PassThru</maml:name> <maml:description> <maml:para>Return the event log record after writing an error.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri/> </dev:type> <dev:defaultValue></dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <!-- Inputs--> <command:inputType> <dev:type> <maml:name>System.Diagnostics.Eventing.Reader.EventLogRecord[]</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <!-- Outputs--> <command:returnValue> <dev:type> <maml:name>System.Diagnostics.Eventing.Reader.EventLogRecord</maml:name> <maml:uri/> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <command:examples> <!-- Examples--> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>C:\PS></maml:para> </maml:introduction> <dev:code>Get-DscError | Write-DscError</dev:code> <dev:remarks> <maml:para>Demonstrates how `Write-DscError` is intended to be used. `Get-DscError` gets the appropriate event objects that `Write-DscError` writes out.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <!-- Links--> <maml:navigationLink> <maml:linkText>Get-DscError</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </maml:relatedLinks> </command:command> </helpItems> <!-- Generated by: SAPIEN PowerShell Help Writer 2015 v1.0.9--> |