Update-OVUserScript
Syntax
Description
The HPE OneVIew 5.30 PowerShell library has gone through a major change, in that all Cmdlet and the C# base class name have changed. PowerShell Cmdlet nouns used the HPOV vendor prefix. This is now OV. The C# based class namespace was HPOneView, and is now HPEOneView.
This script will process a user created script to find references to the original Cmdlet and Class names, and update them acordingly. By default, this Cmdlet will only output to the console the changes it would make. Use the -Replace parameter to commit those changes to the orignal file.
Examples
Example 1
Process the [MyScript.ps]1 script present in the working directory.
Example 2
Process scripts (.ps1) found in the specified directory, and save them.
Parameters
-Path <FileInfo>
The path and file to be process.
| Aliases | None |
|---|---|
| Required? | True |
| Position? | Named |
| Default value | |
| Accept pipeline input? | true (ByValue) |
| Accept wildcard characters? | False |
-Replace <SwitchParameter>
Use to save the changes to the original file.
| Aliases | None |
|---|---|
| Required? | False |
| Position? | Named |
| Default value | |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216)
Input Types
The file object to parse and update.
Return Values
Output of script that would have been modified. Using the -Replace parameter will generate no output.