Check if Computer object exists in AD ?
I have a text file containing 100 server names. I would like to push these into a script and test wheather the computer object exists or if it has been decommissioned (deleted). From the results i can...
View ArticleRetrieve words from text file.
Below is an example of text lines from a log file. How can I capture the domain\userid after the word (User) & the computer name after the word (Machine).Thank you in advance!...
View ArticleNot enough quota is available to process this command.
Hi, I'm trying to run a script in a remote Powershell session and I get a 'Not enough quota is available to process this command.' error. The symptoms are identical with the one reported in this...
View ArticlePowershell Secure String Encryption
I have a question about the AES encryption used by PowerShell's ConvertFrom-SecureString cmdlet when a key is specified with the -Key parameter. If I specify a 256 bit key I would assume that...
View ArticleComparing Figures from two csv files, writing a 3rd file.
Hi, I have two csv files generated from a previous script which contain the following:File1:#TYPE...
View ArticlePowerShell Remoting: On execution of a command to start an exe (wmplayer for...
I have a test bed in my lab consisting of a windows server 2008 running powershell 2.0. I am using that server to manage 50 clients that are connected wired and wireless with the server. I am running...
View Articlescript to populate ProxyAddresses and Mail attribute based on the...
Hi, I am trying to populate the ProxyAddresses AND mail attribute for ALL users based on their UserPrincipalName.Need help with the following: $UPN = Get-ADUser -Filter * |select UserPrincipalName$user...
View ArticleAzure Automation
Q: What is Azure Automation?A: Azure Automation is essentially System Center Orchestrator Service Management Automation (SMA) hosted in Azure. It allows the execution of PowerShell workflows directly...
View ArticlePowerShell DSC Comes to Microsoft Azure
For the past several years Microsoft has been building PowerShell hooks into every product that it produces. PowerShell is a powerful scripting language for sure, and as an IT Pro, if you're not...
View ArticleSend on behalf
Can I send an SMTP message from a Powershell script that performs a "send on behalf" operation?The Send-Mailmessage Cmdlet doesn't seem to offer that capability (using the "from" option tries a "send...
View ArticleScript to test-connection and check if computer object exists in AD
Hello guys, I've list of 3600 machines and i've to test connectivity and existence in AD as i'm a beginner in PS , I'd like to request some help. I have already script to ping machines which are...
View ArticleBulkadd Users to Group - deep level ou
Hi.I am trying to bulk-add users in a txt-file to a group. However both users and group are placed in a sub-ou so when I run my script the group and users cannot be found.Also - I would like the user...
View ArticleCannot access another machine Folder Disk Space
Am running my below comand line in my script.ps1 - to find the disk space of the remote machines (listed in servers.txt in my current folder)Get-WmiObject Win32_LogicalDisk -filter "DriveType=3"...
View Articlead user export wont return all values of select-object
Hello,this is my code:$When = ((Get-Date).AddDays(-7)).DateGet-ADUser -Filter {whenCreated -ge $When} -Properties * whenCreated | Select-Object givenName, sn, SamAccountName, mail | Export-csv -path...
View ArticleRunning a exe a set number of times...
Hello,Have been trying to find a way to get powershell to start a program (exe) a defined number of times. Sometimes I want to run 1 or 2 instances, sometimes over 20. Is there a way to define this...
View ArticleNew Scripts list remove members
good afternoon Working for a private bank and need to develop a script that do the following. I'm starting to develop in Power Shell script. I need the script to check my machines in the network...
View ArticleQuery Azure Storage with PowerShell but without the SDK or Cmdlets
I had a need to query Azure Storage via PowerShell, but I was not guaranteed that the machines I'd be running from would have either the Azure SDK or the Azure PowerShell Cmdlets installed.The script...
View ArticleZipping a single file with PowerShell
I recently needed to quickly create a PowerShell script that would create a Zip file from a specified input file.Read More
View ArticleAutomating VM Configuration using PowerShell DSC Extension
In April, at the //build/ conference, Jeffrey Snover demonstrated provisioning an Azure VM and configuring it using PowerShell DSC (Desired State Configuration) and Custom Script extension. Azure VM...
View ArticlePress PowerShell Pause to Continue
Everyone once in a while I come across a PowerShell script that behaves like an old-fashioned batch file. Not that there’s anything wrong with that, but often these types of scripts put in a pause at...
View Article