This blog has moved to http://ThePowerShellGuy.com
Greetings /\/\o\/\/
My first 3 Windows PowerShell Commands
$host.version
PS G:\MOWSH> $host.version
Major Minor Build Revision
----- ----- ----- --------
1 0 9567 0
# let me run my scripts No Regedit !!
Set-ExecutionPolicy RemoteSigned
Move Profile to Documents and Settings\All Users\Documents\PSConfiguration\Microsoft.PowerShell_profile.ps1
# rename my scripts (otherwise my profile opens with notepad)
ls . *.msh -rec %| {rename-item $_.fullname ($_.name -replace ".msh",".ps1")}
now cleaning up, all the subscript calls in my profile ;-(
and ofcource the CMDlet name changes :
CMDLET RENAME: combine-path -> join-path
CMDLET RENAME: parse-path -> split-path
CMDLET RENAME: match-string -> select-string
CMDLET RENAME: time-expression -> measure-command
CMDLET RENAME: write-object -> write-output
CMDLET RENAME: All *-property cmdlets renamed to *-itemproperty: clear-itemproperty, copy-itemproperty, get-itemproperty, move-itemproperty, new-itemproperty, remove-itemproperty, set-itemproperty
CMDLET RENAME: trace-expression -> trace-command
CMDLET RENAME: invoke-command -> invoke-expression
CMDLET RENAME: Import-SecureString -> ConvertTo-SecureString
CMDLET RENAME: Export-SecureString -> ConvertFrom-SecureSring
CMDLET RENAME: Get-Provider -> Get-PSProvider
CMDLET RENAME: Get-drive -> Get-PSDrive
CMDLET RENAME: New-drive -> New-PSDrive
CMDLET RENAME: Remove-drive -> Remove-PSDrive
even my Custom Typeformatting has to be renamed
MowTypes.PS1XML
hmm, not a fun upgrade becouse of all that renaming, but tomorrow I will show some cool new tricks, and we will forget all those troubles.
b.t.w. a lot of older script on my blog will need a bit of fixing after this,
I will post updated versions of the bigger scripts later on.
gr /\/\o\/\/
Tags : Monad msh powershell