Removing locally installed printers and replacing with print server

Recently ran into an environment where there was a print server installed and managing all 200 printers however some users (380 computers) still had printers installed locally and were printing directly to the printer through the IP address or host name. This can cause issues with permissions, driver updates, or logging. Instead of manually touching… Continue reading Removing locally installed printers and replacing with print server

Remove DNS NS Records after demoting domain controller with PowerShell

  Get-DnsServerZone | ForEach-Object { Get-DnsServerResourceRecord -ZoneName $_.ZoneName -RRType Ns | Where-Object {$_.RecordData.NameServer -like ‘DCName.fqdn.com.‘} | Remove-DnsServerResourceRecord -ZoneName $_.ZoneName -Confirm:$false }   Replace the bold test with the fully qualified domain name of the name server. Don’t forget to keep the period at the end of it as well.

Configuring alarms on all VMware alarm definitions automatically using PowerShell

  My example contains alarm actions to send an email, but you can configure this for SNMP or any other actions. You can copy and paste this into a “.ps1” file to create a PowerShell scripts. # This command will remove any alarms actions that are configured currently. Get-AlarmDefinition | Get-AlarmAction | Remove-AlarmAction -confirm:$false  … Continue reading Configuring alarms on all VMware alarm definitions automatically using PowerShell

SharePoint 2010 Alerts – Daylight Savings Time (DST)

  Are your alerts behind or ahead by an hour? Microsoft has created a PowerShell script to automatically update your alerts for daylight savings time. http://technet.microsoft.com/en-us/library/cc508847.aspx You’ll want to make sure you’re running the script as a SharePoint administration from within the SharePoint Management Shell. Add the PowerShell script to the scope . ./Invoke-AlertFixup.ps1 (make… Continue reading SharePoint 2010 Alerts – Daylight Savings Time (DST)

SharePoint 2010: Unable to Display This Web Part. Error while executing web part: System.StackOverflowException: Operation caused a stack overflow.

  This was caused by the XsltTransformTimeout when using an Xslt list view. This is corrected by installing the February 2012 Cumulative Update and by making the following change via PowerShell. Check Current Setting $farm = Get-SPFarm $farm.XsltTransformTimeOut The default setting is 1 second. The PowerShell code below changes it to 5 seconds which should… Continue reading SharePoint 2010: Unable to Display This Web Part. Error while executing web part: System.StackOverflowException: Operation caused a stack overflow.

Schedule Update-SPProfilePhotoStore

  Create a PowerShell script with the following. Make sure your MySite host location is correct. Add-PSSnapin Microsoft.SharePoint.PowerShell Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation http://mysitehostlocation/MySite/ Save the file as a .ps1 file on your SharePoint 2010 server – C:\Scripts\UpdateSPPhotos.ps1 Create a daily scheduled task on the SharePoint 2010 server that runs at the SharePoint Farm Administrator account.… Continue reading Schedule Update-SPProfilePhotoStore