Clearing only Variables if they are not null
So, either i'm missing something or it's just not possible in the fashion i'm doing it. So I take all the variables I have and put them in an array like $vararray = @("A","B","C","D")Then I tried...
View ArticleNeed help putting a Log file and Error codes
Hi there guys. I am a rookie in PS and i need some help of you.I have this script below to copy files/folder from one location to a list of servers, and i have 2 problems. The firts is to put some...
View ArticleBackup and Restore SQL Server with the SQL Server 2012 PowerShell cmdlets
There are plenty of occasions when it makes a lot of sense to do backup and restore scripts in PowerShell. Microsoft have put effort into making it much easier, as Allen demonstrates.Read More
View ArticleOne-Click Windows Azure VM (IaaS) Deployment with PowerShell User Experience
I somehow got into writing PowerShell script in the last few days for facilitating deploying Windows Azure VMs into configured subnets for our upcoming Windows Azure IaaS Training Days. Read More
View ArticlePowerShell Summit–My recorded sessions
Recently I was lucky enough to attend the PowerShell Summit at Microsoft HQ in Redmond, this was an awesome event which was focused on PowerShell, it included not only people who are using PowerShell...
View ArticlePowerShell the SQL Server Way
Although Windows PowerShell has been available to IT professionals going on seven years, there are still many IT pros who are just now deciding to see what the fuss is all about. Depending on your job,...
View ArticleHelp with adding a string to an existing script
Guys, I would like to know what should i use to add a manager to a user in AD i have the below script that working just fine, i just want to add the manger filed as well. #Import ActiveDirectory module...
View ArticlePowershell when run under a scheduled task requires a local user profile
If I run a scheduled task that executes a PS script, it fails, actually does nothing. If I log onto that system with the user account running the task and then log off again, the scheduled task runs...
View ArticleInstalling an MSP works on the local machine, fails remotely. Why?
Good afternoon,I need some advice.I need to install an application's MSP update file on multiple Win08r2 servers. If I run these commands locally, within the target machine's PS window, it does...
View ArticleFinding a specific file on a list of servers' local drives
I don't know if this can be done, but I need to search for a specific file on only a server's local drives in order to determine whether a certain program is installed. The boxes were all originally...
View ArticleSpeed up powershell script with PrimalForms
Hi,i wrote a script that requires user interaction, the gui was designed with Primalforms. The user can run the script with a simple desktop link.The first time i run the script the start takes ca....
View ArticleCross-post: RMS PowerShell cmdlets - preview release
The RMS team has been hard at work and now have our first preview release of a set of PowerShell cmdlets using AD RMS SDK.Read More
View ArticlePowerShell for Developers - Cmdlets
In PowerShell we have a concept called Cmdlets, these are the functions we use. We’ve already seem some of them, but this chapter will introduce you to the must-know Cmdlets. This is not a catalog of...
View ArticleSetup an Out Of Office text reply on a deprovisioned user's mailbox
I would like to Setup an Out Of Office text reply on a deprovisioned user's mailbox using powershell. I need to have auto reply whenever the user account in active directory is disabled. would you...
View ArticleHashtable export-csv format output
Hi, I have a Hashtable that looks like this:NAME;VALUELibraryA;345LibraryB;867LibraryC;858RegionalLibraryT;156RegionalLibraryY;99LibraryG;689 This is not the order in which I created the Hashtable,...
View ArticleOutput to SQL
Hi,I have a script that will query WMI on my servers and return key metrics (disk space, memory use etc) to a SQL database. I have the basics and can successfully write to the SQL database but I've...
View ArticleRunning a query against large numbers of computers
I've been using the following query to check on whether a service is running on a small number of servers -Get-Service ov* -ComputerName joeserver01I've just been asked to run this on over 100 servers....
View ArticleVery Old FTP, Need Password Encripted
We have a very very very old mainframe here and the FTP that can pull from it is also old and I need to pull a couple of files from it on a daily basis using PowerShell (PS.) This is not a problem,...
View ArticleCompare XML values?
I want to apologize if I'm not using the right terminology... please correct me. I have an XML file that I need to parse through to get some data. One of the first things I need to do is get the...
View Articleread a bunch of file and folders and copy them to a new target
I'm very new to programing and have only done small script where i query AD for information and email results. This script is something I've never done.I have to take some code out of SVN via Jenkins...
View Article