I was dealing with some corrupt profile problems and the profiles registry keys were tied to SID’s so had to do some converting. Get user from providing sid/partial sid Get SID from providing user
Powershell and ServiceNow API – Get Service Catalog catalog task option variables / user selections from ticket
If you are using ServiceNow for your self service catalog, then you may be wanting to try and automate the fulfillment of submitted catalog task items. To be able to pull the user’s selections from the catalog task ticket there are a few steps involved. Use the ticket number the catalog task ticket to retrieve… Continue reading Powershell and ServiceNow API – Get Service Catalog catalog task option variables / user selections from ticket
Powershell and ServiceNow API – How to build headers for authentication using Basic authentication
There are lots of great things you can do with ServiceNow once you get your head around the API and how to work with it, this post will cover building the headers used for connecting with the API using basic authentication. There will be more posts covering actual usage, but if you wanted to get… Continue reading Powershell and ServiceNow API – How to build headers for authentication using Basic authentication
Powershell – Remove files older than X days from given paths
The below code will remove files from the given paths if they have not been written to for the last 7 days from server ‘SERVER01’. Code explained: You create an array called $Paths and add the folder paths you want cleared. A for loop will then go through each path, getting a recursive list of… Continue reading Powershell – Remove files older than X days from given paths
Powershell – Get size of drive on machine in MB or GB, rounded
How to get the size of a drive remotely in MB or GB. By use of the -ComputerName parameter you can run this command remotely.
Orchestrator 2012 R2 – Scheduling with Check Schedule
When working with scheduling runbooks you will see that you will need to work with both the Monitor Date/Time and the Check Schedule activity to get the most control out of when you can put a schedule in place. This post will cover the Check Schedule activity. Once a date/time is triggered by Monitor Date/Time,… Continue reading Orchestrator 2012 R2 – Scheduling with Check Schedule
Orchestrator 2012 R2 – Runbook – Scheduled Reboot of servers
This runbook will run on a schedule and incorporate an already created manual reboot runbook, so that you can then have the option of rebooting servers manually or via a schedule. This runbook will cover the following activities: Using the built-in Monitor Date/Time activity, to wait for a certain time to activate Using the built-in Check Schedule activity, to… Continue reading Orchestrator 2012 R2 – Runbook – Scheduled Reboot of servers
Orchestrator 2012 R2 – Runbook – Manual(Non-scheduled) Reboot of servers
This runbook will check a computer to see if it is reachable, put it into maintenance mode, restart it, and update a sharepoint list on success. It can be ran manually (ad-hoc) or invoked from another runbook. This runbook will cover the following activities: Using the built-in Get Computer / IP Status activity, based on a… Continue reading Orchestrator 2012 R2 – Runbook – Manual(Non-scheduled) Reboot of servers
Orchestrator 2012 R2 – Send Email Activity
I often like to notify myself or another team of the success or failure of a runbook via e-mail and it has become very important in a number of my runbooks. These steps walk through how to use the activity.
Orchestrator 2012 R2 – Creating a static Computer Group
In my case, I wanted to perform scheduled reboots on the same group of servers on a recurring basis. One of the ways of storing the names of these servers was through the in-built Computer Groups area, so I will go through creating using that method. There are many ways of populating a list of servers for… Continue reading Orchestrator 2012 R2 – Creating a static Computer Group