Get-pmScript

Description

This cmdlet lists or saves scripts from PowerMapi.com to files.

This cmdlet is only accessible by PowerMapi Platinum members.

Syntax
Note: Parameters in orange are optional.
Get-pmScript
-CredentialsPSCredential
Get-pmScript
-ListCommunityScriptsOnlySwitchParameter
-CredentialsPSCredential
Get-pmScript
-ListMyScriptsOnlySwitchParameter
-CredentialsPSCredential
Get-pmScript
-ScriptNameString
-SaveToString
-FilenameString
-OverwriteExistingSwitchParameter
-CredentialsPSCredential
Get-pmScript
-CommunityFileIDInt32
-SaveToString
-FilenameString
-OverwriteExistingSwitchParameter
-CredentialsPSCredential
Parameters
ListCommunityScriptsOnlyA SwitchParameter which, if present, causes the cmdlet to query and list only script files that have been uploaded to the PowerMapi community forum.
ListMyScriptsOnlyA SwitchParameter which, if present, causes the cmdlet to query and list only the script files for the user authenticated with Credentials.
ScriptNameA text string that is the name of a script to retrieve from either the Community forum, or from the user's private scripts. If the same name exists in both areas, the private file is chosen. See remarks.
CommunityFileIDAn Int32 value that is the FileID of a community forum script. See remarks.
SaveToAn optional text string that indicates the file system location at which to save the script.
FilenameA optional text string that is used as the new filename for the script when saved.
OverwriteExistingA SwitchParameter which, if present, allows overwriting of an existing script.
CredentialsA PSCredential object holding the username and password for a Platinum site member.
Remarks

When this cmdlet is used without parameters, or with only the Credentials parameter set, it will query and list all scripts from PowerMapi.com from the Community forum as well as the user's personal scripts. Scripts from the community forum will have a FileID property that can be used to specifically save that script.  This is most useful for cases where the same script file name is used multiple times in posts, or when in conflict with a personal script of the same name.

When the ScriptName parameter is used, personal scripts are searched first and if not found, then community scripts are searched.  

The FileName parameter can override the ScriptName when the file is saved.  This is useful for cases where the ScriptName has invalid file system characters, or a duplicate copy is desired with a different name.

When the SaveTo parameter is omitted, scripts are saved in the current user's Documents folder.