Sysadmin Lab

My lab environment and my findings

bookmark bookmark
Posted by Admin ADD COMMENTS

I do this all the time, so why even bother doing it via GUI when you can PowerShell it. Enable RDP using Powershell and ff you have the Windows Firewall enabled, you also need to allow RDP through Windows Firewall: Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections -Value 0 Enable-NetFirewallRule -DisplayGroup "Remote Desktop" Hopefully this will get your lab up and running quicker than ever! How to enable RDP using Powershell including Firewall rules

Categories: Windows
Posted by Admin 4 COMMENTS

Sure, the Group Policy Management Console Scripts released with GPMC or as a separate download has the nice scripts called CreateXMLFromEnvironment.wsf and CreateEnvironmentFromXML.wsf export and import OU/groups/GPOs between domains. But these scripts export and import much more than just the OU structure (groups, GPOs etc) and in some migration scenarios you might want to migrate/copy just the OU-structure. Here's how you can do this using Powershell. Make sure you have the Active Directory module for Windows PowerShell installed and run it from  Start -> Administrative Tools -> Active Directory […]

Categories: Windows
Posted by Admin ADD COMMENTS

If you're in the normal non-Exchange PowerShell or PowerShell ISE and try to run Exchange cmdlet you get the following error: + Get-Mailbox <<<<     + CategoryInfo          : ObjectNotFound: (Get-Mailbox:String) [], Command    NotFoundException     + FullyQualifiedErrorId : CommandNotFoundException Simple solution: For Exchange 2010, run: Add-PSSnapIn Microsoft.Exchange.Management.PowerShell.E2010 For Exchange 2007, run: Add-PSSnapIn Microsoft.Exchange.Management.PowerShell.Admin More info: You could also enter the following to get a list of Powershell Snap-Ins that are registered on the system and that you could use: Get-PSSnapIn -Registered […]

Categories: Exchange