PowerCLI is really easy to install now. From an Administrative Powershell window just enter:
1 |
Install-Module -Name VMware.PowerCLI |
Minimum Powershell Version must be v3. Offline Install of PowerCLI Accessing the PowerCLI Modules We’re now ready to download the PowerCLI modules. This task will require a system with internet access. This section has …
Interactive Here’s your typical scenario. You have a script that requires credentials internally. So to provide those credentials you would do something like $MyCredentials=GET-CREDENTIAL –credential “CONTOSO\Username” and you of course see a box like this normally on the screen Then you would type in the password and life would go …
Using PowerShell scripts within a task sequence provides more flexibility than using the CustomSettings.ini file to join a computer to a domain. The parameters of the CustomSettings.ini file are common to any deployment you perform. That’s why creating a custom PowerShell script to join your domain will be customize to …
In this post, I will be teaching you how to configure Windows Event Logs Forwarding for Active Directory Security Logs that are stored on Domain Controllers. This is a real world example of how to use DSC in your environments and showcases the benefits of using DSC. If you are …
Run Local Functions Remotely in PowerShell Have you ever had functions loaded into your local PowerShell session and needed to run them on a remote system? The typical solution to this problem is to copy the code to the remote system and then load the functions on the remote system …
1 |
Install-WindowsFeature –name NET-Framework-Core –source D:\sources\sxs |
Familiar looking commands like Dir or Ls are in fact Powershell aliases of Get-Childitem. There are many built-in aliases in Powershell and you can even create your own, using the New-Alias cmdlet eg.
1 |
New-Alias -Name "exp" explorer |
To get a list of aliases on your system run:
1 |
Get-Alias | Select name, resolvedcommand | Export-Csv -Path c:\temp\alias3.csv -NoTypeInformation |
The default Aliases …
I’m sure for anyone who administers Microsoft Windows Server the Server Manager console is an all too familiar place. It does make it easy to add/remove roles and features however PowerShell is another great option that can really speed things up at times. So – what can we do with …
This powershell script copies the contents of an S3 bucket to your pc.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# Your account access key - must have read access to your S3 Bucket $accessKey = "YOUR-ACCESS-KEY" # Your account secret access key $secretKey = "YOUR-SECRET-KEY" # The region associated with your bucket e.g. eu-west-1, us-east-1 etc. (see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-regions) $region = "eu-west-1" # The name of your S3 Bucket $bucket = "my-test-bucket" # The folder in your bucket to copy, including trailing slash. Leave blank to copy the entire bucket $keyPrefix = "my-folder/" # The local file path where files should be copied $localPath = "C:\s3-downloads\" $objects = Get-S3Object -BucketName $bucket -KeyPrefix $keyPrefix -AccessKey $accessKey -SecretKey $secretKey -Region $region foreach($object in $objects) { $localFileName = $object.Key -replace $keyPrefix, '' if ($localFileName -ne '') { $localFilePath = Join-Path $localPath $localFileName Copy-S3Object -BucketName $bucket -Key $object.Key -LocalFile $localFilePath -AccessKey $accessKey -SecretKey $secretKey -Region $region } } |
Source
Office 365 doesn’t offer you a way to easily import a list of contacts into your company’s Global Address List (GAL). But it can be done quite easily with Powershell and a csv file of the contacts to import. First of all the csv file. There are some mandatory fields …