0

Powershell: Prevent Users To View and Change Input or Config Files That Are Used by a Script

Posted by Tao Yang on 16/05/2012 in PowerShell |

Often, I use .xml or .ini files to store settings that a PowerShell script uses. When I distribute my scripts to end users, sometimes, I want to make sure users cannot manually view or change the content of these config files. Below is what I did to achieve the goal: Create a password protected zip [...]

Tags:

2

Using SCOM PowerShell Snap-in and SDK client with a PowerShell Remote Session

Posted by Tao Yang on 09/05/2012 in PowerShell, SCOM |

Recently, I’ve been working on a utility based on PowerShell scripts using WinForms GUI to perform some SCOM tasks (i.e. create maintenance window, approve manually installed agents, adding network devices, etc.). Since this script is going to be widely used in the organisation when it’s completed, I’ve always kept in mind that when users run [...]

Tags: , ,

0

Disabling Auto Discovery in SCDPM 2010

Posted by Tao Yang on 01/03/2012 in SCDPM |

System Center Data Protection Manager is not something I normally play with. Recently, I’ve been dobbed in to troubleshoot an issue with remote sites network performance at work and the issue ended up was caused by Auto Discovery in DPM 2010. So basically, DPM has this built-in function called “Auto Discovery” which queries the domain [...]

Tags: , ,

2

PowerShell Script: Remove All Packages From A SCCM Distribution Point

Posted by Tao Yang on 19/02/2012 in PowerShell, SCCM |

Often, SCCM administrators found packages still assigned to distribution points that no longer exist. There are scripts available to remove these “orphaned” package distributions via SMS Provider. i.e. This one called DPClean.vbs from TechNet Blog: Removing a retired DP from all your packages. It was written for SMS 2003. I’m not sure if SMS 2003 [...]

Tags: , ,

0

PowerShell Script: Get SCCM Management Point server name from AD

Posted by Tao Yang on 16/02/2012 in PowerShell, SCCM |

I wrote this function as a part of a script that I’m working on. it searches AD for the management point server name for a particular SCCM site: Note: This function uses another function called Get-AllDomains, which I’ve blogged before here: http://blog.tyang.org/2011/08/05/powershell-function-get-alldomains-in-a-forest/ So make sure you include BOTH functions in your script.

Tags: ,

0

PowerShell Script: Calculate First and Last IP of a Subnet

Posted by Tao Yang on 09/02/2012 in PowerShell |

I just wrote this script to calculate the first and last IP of a subnet based on any given IP (within the subnet) and it’s subnet mask: Syntax: .\Get-NetworkStartEndAddress.ps1 “IP address” “Subnet Mask” Download here: Get-NetworkStartEndAddress.ps1

Tags:

15

SCCM Health Check Script Updated: Version 3.5

Posted by Tao Yang on 31/01/2012 in SCCM |

I have just updated the SCCM Health Check Script to from version 3.3 to 3.5 Version 3.4 was finished a while back but I never got time to publish it in this blog. I only emailed 3.4 to few people who contacted me from my blog. Now that I’ve updated it again to 3.5, I [...]

Tags: , ,

3

PowerShell Script: Convert To Local Time From UTC

Posted by Tao Yang on 11/01/2012 in PowerShell |

I wrote this function in the script from my previous post “SCOM MP Authoring Example: Generate alerts based on entries from SQL Database (Part 2 of 2)”. It comes handy sometimes so I thought I’ll blog it separately as well. In PowerShell Datetime object, there is a ToUniversalTime() method that converts local time to UTC [...]

Tags:

4

SCOM MP Authoring Example: Generate alerts based on entries from SQL Database (Part 2 of 2)

Posted by Tao Yang on 05/01/2012 in SCOM |

This is the 2nd part of the 2-part series.  Part 1 can be found here. In Part 2, I’ll cover the steps involved to create each module type and the rule in this article. all these objects will be created in SCOM 2007 R2 Authoring Console. You can create a new management pack for this [...]

Tags: , , ,

0

SCOM: Using PowerShell to update SMTP server address in SMTP notification Channels

Posted by Tao Yang on 10/12/2011 in SCOM |

I’ve been asked a question on how to bulk update SMTP server addresses in SMTP notification channels using PowerShell. Here’s the script to run in OpsMgr Command Shell:

Tags: ,

Copyright © 2010-2013 Tao Yang's System Management Blog All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.2, from BuyNowShop.com.