Sever 2012 Enable RDP In the spirit of indempotent commands
I have not posted anything for a while, and I have been trying to get up to speed on DSC, which makes you think a little differently about the tools you make. I recently had to build a few new...
View ArticleStrange: "Program 'more.com' failed to run: Object reference not set to an...
All, The only changes I've made to my W2K12R2 servers is i added some code to my PSH Profile to center my screen and set size/width/font properties. I also applied the latest round of MS Patches a...
View ArticleFiltering the list of tables to script
Hi,I have this script, that scripts all tables in a database into one file. How can I change it so it scripts only tables, which match the masks of 'Table1%' or 'Table2%' into individual files named...
View ArticleUsing some sort of wildcards in replacement
Hi,I've got a script file to create a database as below. It has strings like "N'S:\SQLData\" and "N'R:\SQLLogs\". They may also look like: "N'T:\SQLData\" and "N'U:\SQLLogs\". There are three of...
View ArticleReset a Computer Account's Active Directory Password from the Command Line
Q: How can I reset a Windows computer account's Active Directory password from the command line?Read More
View Articleunable to extract ipv4 address only from a variable storing both ipv4 & ipv6
Hellousing Regex, i want to extract only the ipv4 address from a variable ($NICIpAdd) which contains both ipv4 & ipv6 addresses & then show that ipv4add on the console. but i encounter...
View ArticleTrying to place few servers in Maintenance Mode
Hi,I am trying to place few servers in Maintenance Mode in SCOM 2012. My requirement is to check all the server list and place only the servers which are not in Maintenance mode (MM) in to MM.I mean,...
View ArticleSplit and join?
This should be simple, I want to take a domain name from it's FQDN structure, split it on the "." and rebuild it in the "dc=nnn,dc=nn,..dc=com" format. the fqdn could have a variable number of parts,...
View ArticleCan not remove an item from an ARRAY
Hello,I'm getting a list of groups that a user belongs too.I don't want "Domain users" or "users" as part of the array. I have tried this scenario below to remove with no luck.What is the best way to...
View ArticleCreating AD Contacts from .CSV
Hello,I am relatively new to Powershell and below is the script I have to create an AD contact so we can forward all users email to an external address. In Powershell ISE I get the below error. Can...
View ArticleFind Expired Accounts in Active Directory using Powershell
You must have seen my previous article where we saw how to find empty groups in Active Directory using Powershell. Continuing on the same front, we will now see how to find Expired Accounts in Active...
View ArticleEnable versioning programmatically using Powershell and CSOM
Powershell script that enables versioning for SharePoint Online list or library. It requires installed SharePoint Online SDK.Read More
View ArticleSharePoint: Adding WebPart on Pages Using PowerShell Script
One of the requirements of our project was to replace the existing webpart from our production site that was causing many problems with performance. This web part was available in multiple content...
View ArticleDocumenting Citrix XenDesktop 5.x with Microsoft PowerShell
Ever since I released the first documentation scripts in October 2011, people have been harassing, I mean asking, me when I will release a XenDesktop script. After 23 months of tedious effort and with...
View ArticleBreak Your Batch Habit and Move to PowerShell
Windows PowerShell should rightly be seen as a replacement for batch file scripting (Cmd.exe shell scripting), but for some reason, many people seem to be unwilling to leave batch behind. This article...
View ArticleSet-ADUser from pipe
Hi guys,I'm wanting to clear out any titles that staff have in AD so they are all blank.I'm testing the command with this first:Get-ADUser -Identity testuser -Properties Name, title | select name,...
View ArticleGet filename consisting of two dots
Hi guys,I want to make a script that searches through subfolders on files that contain two dots.for example: test.txt.random I have tried: $extension.name -match "*.*.*") but it doesn't work.....
View ArticleI needed to remove a list of software from the computers
HI,Due to new Voice Software upgrade we need to remove the old software and install the new software.Old version got 7-9 modules but all start from same company name like adobe...So how do i uninstall...
View ArticleMy script takes over an hour to run !?
Hi all,I'm new to powershell and have finally finished my first script to get all the groups of 2 OU's and some extra groups that I need to report on and get all the users - and output into the format...
View ArticleIterating through multiple text files to install muliple printers on...
I am racking my brain trying to figure out the best logic to take a list of computers, a list of printers, and a list of associated printer names and parse these to enable me to install each printer,...
View Article