Posted in Uncategorized

PowerShell Commands for my reference

Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of acommand-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to COMand WMI, enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and CIM enabling management of remote Linux systems and network devices.

 

How to enable the Active Directory Modules and Commandlets

For Windows 2008 R2 Server

Open an elevated Powershell console window and run the following commands:

PS C:\> import-module servermanager

PS C:\> Add-WindowsFeature -Name “RSAT-AD-PowerShell” -IncludeAllSubFeature

PS C:\>import-module activedirectory

PS C:\>Get-ADDomain

Now you can refer the CMDLETs from the link and execute the commands

How to search for a text content in large number of files using PowerShell

I was making a WI modification and was looking for a text word in the config files. Windows search does not result well where the below command helped me well.

PS C:\>Get-ChildItem -Recurse | Select-String “Text word to be searched”

 

 

 

 

 

 

 

 

Advertisements

Author:

Citrix Technical Expert interested to learn new technologies and all the tips and tweaks of Citrix Products.... Interested to Automate the manual tasks...

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s