Getting AD users having a specific field NOT filled in...
The first pipe below returns the users with some description filled in; the next one returns an error: The search filter cannot be recognized How do I get the users with a certain field NOT filled...
View Articlehow to play wav file in the background on Windows 7 64-bit
Hi, I need to use the Windows scheduler to schedule PCs to play wav files at certain time in the background. When we were using XP, we can easily use the sndrec32.exe to play wav file in the...
View ArticleTrouble modifying CSV with switch statement ?
I have a simple csv-file like this: Company;Department aaa;abc bbb;xyz With this code $b=import-csv test.csv -Delimiter ';' $b | %{ switch ($_.department){ 'abc' {$_.company="companyX"} default...
View ArticleMultiple Server Ping
Hello All, I'm currently writing a quick script for pinging servers and returning with a status, its basic at the moment but I will expand it once I have fixed this bit! $Servers = Import-Csv...
View ArticleGet-ADUser info in file to return emailID & Name
Hello, I have a requirement that I wan to search for a bulk of users in the active directory based on what has been populated in the Description Field. Is there a tool or a script that can help me to...
View ArticleExchange - Queue - powershell
Hi all, I need to know if a specific computer queue is defined in exchange server 03 using powershell. If not defined, i need to set up...VHO
View ArticleNew-WebServiceProxy timeout setting?
Hi, Is there a way to increase the timeout setting for new-webserviceproxy? I am calling a webservice that takes a some time and my powershell script times out "New-WebServiceproxy : The operation has...
View ArticleEnumerating and Listing Active Directory Extended\Special Security Permissions
Hi all, I am looking for one of a couple potential things that should be able to solve my issues. Essentially I would like to be able to enumerate the rights given to users\groups on AD containers\OUs...
View ArticleRounding [INT] in PowersHell
I am having trouble displaying only two decimals places when i am running the following code: $Event.Message = 14.26171875 (This is just to show what the number is) I am splitting to get portion of the...
View ArticleGet list of distribution groups that user is a member of
We are using Exchange Online at our company. I would like to know how to use PowerShell to get a list of distributions groups that a user is a member of. I have tried several of the other methods...
View ArticleXML SelectNode - Parenting
Taking this XML file <?xml version="1.0" encoding="UTF-8"?> <Os> <O> <name>OName1</name> <id>1</id> <tags> </tags> <Qs> <Q>...
View ArticleWorking with files, who's paths are too long
Is there any way of getting around the dreaded error Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the...
View ArticleConvertTo-HTML
How can I convert a log file to HTML file without losing the format. I tried ConvertTo-HTML but it's not giving the desired output. I am not able to attach file to the post hence copied sample log...
View ArticleE-mail notification when VM is shutdown and when is back up and running
Hello I will set some scripts to shutdown my VMs using Codeplex scripts (Host: Windows Server 2008 R2 with HyperV role). I need to add e-mail notification to get a mail upon successful shutdown and...
View ArticleExclude autoenrollment certificates
I would like to list all issued certificates except autoenrollment ones. My script shows all issued. How to change this code that autoenrollment ones are excluded? I have used PSPKI module...
View Articlefiltering event logs with specific date range
Hi All, I'm new to powershell and i need help with retrieving event id 560 with specific date range provided as input. currently im using the following command. but i want it to be able to specify a...
View ArticleHow can I search users based on what filled in the Description filed in...
Hello, I have a requirement that I wan to search for a bulk of users in the active directory based on what has been populated in the Description Field. Is there a tool or a script that can help me to...
View ArticleSOLVED: List printques and printjobs and remove unnecessary text in "name"
Hey I got this script... $printserver = printserver01 #define printserver $d = gwmi win32_printjob -comp $printserver -cred $cred #get printjobs from the server $d | select name, document #select name...
View ArticleExporting AD Users to CSV, editing/updating, then importing back into AD
Hi guys, I am very new to Powershell and need some help. I would like to export all users to a CSV, file ( with only the details name, department, description, title, company,and office ) update the...
View ArticleMove List of inactive machines to InactiveOU
Hi Team, I've list of inactive machines. above 3000 inactive machines is in excel sheet. i want to move them into inactive ou. Could you please provide me PS script for that, i want to move those...
View Article