Tag Archive for PowerShell

PowerShell Commandlet – Compress-Archive to create zip files

folder-compressed-300x225

As I am constantly dealing with log file management on my servers, I have always relied on batch files to use PowerShell commandlets to move log files. And then I had to run other processes to manage the log files in a destination area.

 

 

I found this handy PowerShell commandlet called Compress-Archive.  You will need PowerShell version 5.0.

The link to the official documentation.

Anyway, this little routine has saved me some steps and with my log file management issues.

I simply zip files with and have the destination path in the same line.

I used example #3.  (This is not my exact script that I wrote, just showing the example.)

Compress-Archive -Path C:\Reference\* -Update -DestinationPath C:\Archives\Draft.Zip

 

I hope this tid-bit helps all of my fellow techies out there.

~Tony Maddin~

 

powershell-logo

Windows Azure is currently performing an operation on this deployment that requires exclusive access.

Microsoft_Azurepowershell-logoWindows Azure Error, “Windows Azure is currently performing an operation on this deployment that requires exclusive access.

I got this error when trying to provision multiple virtual servers with PowerShell at the same time.  Unfortunately, Azure will not allow you to create/provision Virtual Servers at the same time.

Answer = To create and/or provision your virtual servers in sequence.

~ Tony Maddin ~