PowerShell

How to use –Exclude switch in Remove-Item cmdlet in PowerShell

Hi, today i was trying to remove some junk folders and files in a  specific folder. But i don’t want to remove all of file and folder , i want to keep few folders. Then i think that i should use the –Exclude switch with Remove-Item Cmdlet. I tried to use –Exclude switch but somehow… Continue reading How to use –Exclude switch in Remove-Item cmdlet in PowerShell

SCOM

How to Deploy or Install Audit Collection Services (ACS) in SCOM 2007 R2

Hi all, Q: what is Audit Collection Service (ACS) Answer: In Operations Manager 2007, you can use Audit Collection Services (ACS) to collect records generated by an audit policy and store them in a centralized database. By default, auditing is configured on individual computers and all events generated from an audit policy are saved to… Continue reading How to Deploy or Install Audit Collection Services (ACS) in SCOM 2007 R2

PowerShell

Creating System Footprints using PowerShell

    WMI can retrieve a lot more object instances than you might think. If you submit a parent class, Get-WmiObject returns all instances of all derived classes. That’s why a simple line like the following can get you all hardware-related instances: PS> Get-WmiObject -Class CIM_PhysicalElement | Group-Object -Property __Class   Count Name                                                       Group… Continue reading Creating System Footprints using PowerShell

PowerShell

“More” Can Be Dangerous – Use Better Alternative in PowerShell

  PowerTip of the Day, from PowerShell.com:   You might know the more.com tool: when you pipe output to more.com, the output is displayed page by page: PS> Get-EventLog -LogName System | more However, “more” can be dangerous as you see here. You will not get any results for a long time, and your CPU… Continue reading “More” Can Be Dangerous – Use Better Alternative in PowerShell