Category Archives: Scripting

Import .reg files remotely with PowerShell and PSSession

Been into PowerShell and Automation for a while now. #Creating PSCredential object Snippit $User = “M-toTheI’ke” $File = “\\Contra2\D$\Powershell\Password\Password.txt” $MyCredential= New-Object -TypeName System.Management.Automation.PSCredential ` -ArgumentList $User, (Get-Content $File | ConvertTo-SecureString) cls #Build Session $servers = Get-Content “c:\Powershell\Servers.txt” Location of Registry … Continue reading

Posted in Powershell, Scripting | Comments Off on Import .reg files remotely with PowerShell and PSSession

Scripting for user info

Some times out of the blue. Mostly in haste to see if an account has been changed or locked. I usually use a couple of things. $User = Read-Host ‘User’ Get-ADUser -Identity $User -Properties * |ft Name,PasswordLastSet,PasswordNeverExpires,PasswordExpired,PasswordNotRequired Easy 2 lines … Continue reading

Posted in Powershell, Scripting, VbScript | Leave a comment