Category Archives: PowerShell

BPOS Mailbox Sharing and Delegation

The contents for your powershell script $cred = get-credential $csv = Import-Csv –Path c:\bposscripts\mailbox-permission.csv $csv | Add-MSOnlineMailPermission -Credential $cred Example content csv: Identity,TrustedUser,GrantFullAccess,GrantSendAs user1@example.com,admin@example.com,True,True user2@example.com,admin@example.com,True,False This command grants admin@example.com (TrustedUser) fullaccess and/or send as permissions on user@example.com MSOnlineMailPermission

Posted in BPOS, PowerShell | Tagged , | Leave a comment

Change AD-User property’s using PowerShell

# ======================================================= # # Microsoft PowerShell Source File # # NAME: Update Active Directory Users  # # AUTHOR: JWN # DATE  : 11/01/2011 # # COMMENT: This sample script performs an update of AD users # Using the powergui AD … Continue reading

Posted in PowerShell, Windows Server 2008, Windows7 | Tagged , | Leave a comment

PowerShell Revert to snapshot

For our test environment we need to rollback to a snapshot(default) every evening. I don’t like to do that by hand so lets create a script.The second point it has to be run as a scheduled task and I don’t … Continue reading

Posted in Esx4, PowerShell, VMWare | Leave a comment

PowerShell Show VM having snapshots

By default a param minus 30 days. Save it to a *.ps1 file and it ready to use. param ($Age = 30) Connect-VIServer localhost$vm = Get-VM$snapshots = Get-Snapshot -VM $vmWrite-Host -ForegroundColor Red “Old snapshots found:”foreach    ($snap in $snapshots) {    if … Continue reading

Posted in Esx4, PowerShell, VMWare | Tagged , | Leave a comment

WSUS Database cleanup/update using PowerShell

Using Powershell to cleanup the WSUS database, free disk space increased 12 GB. #Region VARIABLES # WSUS Connection Parameters: # YOUR SERVER NAME [String]$updateServer = "SERVER NAME" [Boolean]$useSecureConnection = $False # Port number [Int32]$portNumber = 8530 # Cleanup Parameters: # … Continue reading

Posted in PowerShell, Windows Server 2008 | Tagged , | Leave a comment