Quantcast
Channel: Kreslavsky IT blog » powershell
Browsing latest articles
Browse All 10 View Live

Windows 2008 Identify all AD admins script

PowerShell script to find all Active Directory admins in domain Get-QADUser -ldapFilter ‘(SamAccountName=*.admin)’|export-csv filename.csv

View Article



Rename all Domain Local Administrator Username Via Script

Use this PowerShell script to rename Local Administrator Account on a list of remote machines. #$erroractionpreference = “SilentlyContinue” $a = New-Object -comobject Excel.Application $a.visible =...

View Article

PowerShell script to find all Local Users on a remote computer

$strComputer = "ComputerName" $computer = [ADSI]("WinNT://" + $strComputer + ",computer") $computer.name $Users = $computer.psbase.children |where{$_.psbase.schemaclassname -eq "User"} foreach...

View Article

PowerShell Script To Create Snapshot of All VMs – Hyper-V

$VSMgtSvc=Get-WmiObject -ComputerName localhost -NameSpace "rootvirtualization" -Class "MsVM_virtualSystemManagementService" get-wmiobject -computername localhost -Namespace rootVirtualization -query...

View Article

Move Domain Controller to other site – PowerShell

$dcname = <DomainDNSName> $newSite = "NewSite Name" $context = New-Object System.DirectoryServices.ActiveDirectory.DirectoryContext(‘DirectoryServer’, $dcname) $dc =...

View Article


Useful AD PowerShell Commands

Finding Disabled Users: get-qaduser –disabled Create a new Active Directory user: new-QADUser -name '<User CN>' -parentContainer '<Parent DN>' -UserPassword '<Password>' -FirstName...

View Article

Exchange 2007 ADD Powershell CmdLets

Add- AD Permission – Used to add permissions to an Active Directory directory service object. Add-AvailabilityAddressSpace – Used to define the access method and associated credentials that are used...

View Article

Image may be NSFW.
Clik here to view.

How to update exchange 2007 Offline Address List

  You can update OAB by 2 ways via EMS or using Power Shell 1 To update via  EMS Open EMC>Organizational Configuration>Mailbox>Offline Address Book tab. Right click on desired Address Book...

View Article


Exchange 2007 CCR Database Move Examples

  If you try to move DB on Exchange 2007 CCR you will find that the option is grayed out. And you can’t use Exchange Management Console. You can move your DB’s via powershel, see examples bellow....

View Article


Send Email Powershell script

  Some times we need to use PS script to send email, script can be used in Task Scheduler or any other program BatchFile to run script: Create *.bat file...

View Article
Browsing latest articles
Browse All 10 View Live


Latest Images