Powershell - Setting Display Name
Can anyone help, basically i want to be able to change a load of display names from a CSV which has 2 columns, username and display.$detail = import-csv -header username, display...
View Articleoutput of cmd in command prompt as key and vaule in properties file
hi,i want to get the value of any command which i run using cmd in a properties file as a key and value rather then getting it in text filefor example - hostname>output.txt [not good], i want it...
View ArticleExtraction of Account Expiration to Telephone's Notes (AD)
Good day all,My objective for the following powershell script needs to satisfy the following requirements,1) Get-ADUser from an OU2) Foreach Users whose Accounts are not disabled3) Replace the "info"...
View ArticlePowershell Variable from Excel.VBA Macro
Hi Guys!I don't know if what i'm asking you is achievable.I've learned how to pass variables/arguments from powershell to Excel/VBA Macro but i need to do the opposite thing.This is an example of what...
View ArticleLogon and do some Work in different Domains in one Forrest dosent work...
Hi together..i have the Problem that i need to maintain Groups in all Sub Locations just adding on dailybase all Users to a special Group... my Problem is that i need to maintain these Groups in 5...
View ArticleWindows Update ResetAuthorization
Hi,I am hoping this is the right place to post this, I am trying to do an equivalent of a “WuauClt /ResetAuthorization” via the WU API, but can’t find the method required, I am wondering if this is a...
View ArticleCheck if application is running if so block logoff until application is closed
Hi I have a web based application which uses a local db, to prevent DB corruption I need to create a script that queries if the browser in this case Chrome is running, if so the user get a message...
View ArticleRetrieving Mapped drives not working in System account
Hello Team, Greeting All!My aim is to retrieve the list of mapped drives in users computer. I am using the below code to achieve this, When I use my vbscript with user account it works, whereas if I...
View ArticleCombining These Different Psxec Commands in One Line
I use a bat script and it has some PsExec commands. We want to combine these two commands in one psexec line. We tried something [ ^&,&&, &, (cmd1 & cmd2) etc.. ] but it didn't...
View ArticleOut-File to CSV holds on to information
Hey everyone,Here is my issue. I have a Powershell v2.0 application that I created using Sapien Powershell Studios, that sends information to a CSV. Then I have another script(batch) that reads the...
View ArticleHow to pass an input file to a powershell script which makes changes to AD...
I am using the below script to make changes to a mail attribute in AD. At the moment, the script takes input from a ldap query. I would like to change it to an input file containing email addresses. In...
View ArticleBest way to ensure combinations from the ValidationSet parameter attribute...
I have an advanced function I have been working on that looks something like this:Function Do-Something { [cmdletbinding()] Param ( [Parameter(Mandatory=$true, [ValidateSet('Yes', 'No', 'Y', 'N',...
View ArticleVB Script does not change the value of the Environment variable TEMP
On Error Resume Next Const wbemFlagReturnImmediately = &h10 Const wbemFlagForwardOnly = &h20 arrComputers = Array("SUNDAR-PC") For Each strComputer In arrComputers WScript.Echo WScript.Echo...
View ArticlePowershell - Move Inactive Computer Objects
Found a lot of scripts out there that do the same thing but since I spent a little time on this I'd like to understand why it doesn't work. I wrote a script that finds all Inactive computer objects in...
View ArticleHow can I remove files that do not contain the number 1 or ~1?
I had to convert many .avi files. The new names all contain ~1. Those files I want to keep and remove the originals. There are scripts to remove files with a numeral such as 1. I need one to remove...
View Articlerun application asynchronously using powershell
Hello all,I am trying to run an application asynchronously per each subfolder within a given directory, but I have not been able to create a script that behaves exactly as I want...This is what I have...
View ArticleScript to check RDP connection status
Hi all,Could anyone provide me a script to check whether multiple remote servers are able to RDP or not. I just want to check the connectivity status. I have checked with past threads available in...
View ArticleCommend Prompt on Windows 8/8.1
Hey Guys I have a problem which occurs on only Windows 8/8.1Older versions have no problem like that.Whenever I normally run a script (.bat) file it works fine and it's current...
View ArticlePowershell: Getting IP v4 Address on a multihomed system
Hello, I started setting up a Powershell script as Shutdown script for the clients in the domain. It's last task is writing some inventory information into a file on a shared folder, which it does. The...
View ArticleQuery Active AD user
Hi Everyone,I need to query all active AD users with the following condition: - Only return active users with user ID that starts with a letter follow by numbers (eg x12345) except for user ID that...
View Article