No Image

Get Password Policye for all domains in a forest.

December 21, 2020 JB 0

Get Password Policy for all domains in a forest..   (Get-ADForest).domains | %{​Get-ADDefaultDomainPasswordPolicy -Identity $_ }​ | Select-Object * | Export-Csv -Path C:\Reports\DefaultPasswordPolicy-All.csv -NoTypeInformation Having […]

No Image

KMS activation

June 9, 2020 JB 0

How do I manually connect my Windows or Windows Server device to the KMS activation server? Right Click on the Start menu and select Command Prompt (Admin) Run […]

Backup GPOs basing on GPO DisplayName

May 21, 2020 JB 0

$invalidChars = ‘:\\/’ + [RegEx]::Escape(-join [IO.Path]::InvalidPathChars) $backupDir = ‘C:\temp\backup’ Get-GPO -All -Domain <DOmain Name>| ForEach-Object { $name = $_.DisplayName -replace “[$invalidChars]”, ‘_’ $gpoDir = Join-Path […]

Activate Windows with KMS server

May 5, 2020 JB 0

Activate Windows with KMS Server Step 1: KMS Client Setup Key Before activating your Microsoft product (Windows or Office) on the KMS server, you must change […]

No Image

Function Name: Get-LoggedIn

April 21, 2019 JB 0

Function Name: Get-LoggedIn   # ——————————————- # Function Name: Get-LoggedIn # Return the current logged-in user of a remote machine. # ——————————————- function Get-LoggedIn { […]

No Image

Function Name: Get-Uptime

April 21, 2019 JB 0

Function Name: Get-Uptime # ——————————————- # Function Name: Get-Uptime # Calculate and display system uptime on a local machine or remote machine. # ——————————————- function […]

VM inventory using Powershell

January 24, 2019 JB 0

Set-PowerCLIConfiguration -DefaultVIServerMode Multiple -Scope User -Confirm:$false Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Scope User -Confirm:$false #$cred = Get-Credential Domain\username Connect-VIServer VCenter-Name -Credential $cred -force & { foreach ($vCenterServer […]

NewRemote-Process

January 5, 2019 JB 0

cls Function New-RemoteProcess { #[CmdletBinding()] Param( [String]$ComputerName = $env.computername, [String]$Cmd = $(Throw “You must enter path to the command which will create the process”), [String]$ac, […]