How to use #Requires

Function, Script The Simplest way: #Requires -Version 3.0 #Requires -Modules ActiveDirectory, DnsClient #Requires -RunAsAdministrator or #Requires -Version 3.0 -Modules ActiveDirectory, DnsClient -RunAsAdministrator if you require exact version: #Requires -Modules PPoShSqlTools, @{ModuleName=”PPoShTools”;ModuleVersion=”1.0.5″} Module # # Module manifest file .psm1 # @{ ModuleVersion = ‘1.0.0’ PowerShellVersion = ‘5.0’ RequiredModules = @(‘PPoShTools’,’PPoShSqlTools’) }

Hyper-V: Remove all VMs snapshots

A few days ago we got a job. Once again update all Windows Server. Because after previous updates we had some problems I decided to do checkpoints for ALL VMs. When asked “How we will remove them?” I said, “This will be one line in PowerShell”. Because it is one line, however, it took me […]

PowerShell and 7-zip >> unzip

Only quintessence: x¬†¬† ¬† ¬†¬† – This command preserves the full paths. -aoa¬† – This switch overwrites all destination files. -r¬†¬†¬†¬†¬†¬† – Enable recurse subdirectories. ` – to ensure that PowerShell wouldn’t like to interpret.

Windows 10 Original Product Key

Did you ever wonder what is Windows 10 Original Product Key after upgrade from Windows 7 or Windows 8 ? I found that after every upgrade Windows 10 Pro Installed Key is : VK7JG-NPHTM-C97JM-9MPGT-3V66T. What happened with original key ? After some research i found that only two programs (I was searching for scripts also) […]