Notes about Powershell

Import-Module WebAdministration -ErrorVariable ImportError -OutVariable ImportOut
if (![string]::IsNullOrEmpty($ImportError))
#[void]$Logging.AppendLine(“Import-Module err : ” + $ImportError)
throw ($ImportError)

– The problem is that I need elevated rights to use Get-Website

Or maybe just to Import-Module WebAdministration


Main – function


Scripts are read from the top to the bottom, so you can’t use any references before they are initiated. You could however create a script/scriptblock that simulates how programming languages work.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s