Get-ADUser with the -LDAPfilter using a regex
I'm by no means a novice to PowerShell, but for my first year and 1/2 using it the organization I worked for only had 2003 AD functional level, so to do AD stuff I needed to use the Quest Active...
View ArticleChange domain using powershell
I have multiple domains on my server. I need to check whether a user is a member of which group using powershell.When i try :-Import-Module ActiveDirectory Get-ADUser 'sam' I get an error:- Get-ADUser...
View ArticleHow to grant permission to private key from powershell
I'm trying to find a way to grant permissions for private key from powershell script. Certificate is stored in CNG. All ideas are welcome.
View ArticleAutomate a login script and exit Website - Problem with login in function
Hello All, I've started working on a script to login to a site automatically and have an output log file. The problem i have is the button (login nutton) line of code in my script, i'm not sure if it...
View ArticleGPO Computer Startup Script to copy a file from my NAS to my computer.
So I have a script that runs fine manually and does run when applied via gpo, but it does not work correctly when applied this way. It's suppose to copy a file from my NAS to my desktop. I've isolated...
View ArticleFind keyword in text file from an array
Hi,I have an array of collection of keyword:$KeyWord = @("Fail","Exception","Terminated","Error")I want to check in a textfile sample.txt, if any or all keywords from the array $KeyWord exist. If any...
View ArticleGroup Membership based on Extension Attributes
I'm trying to build a simple script to modify group membership based on the Extension Attributes of my users.This is what I have to add users to a...
View ArticlePowerShell and iTextSharp
I am trying to create a script that will convert text documents in a defined directory to PDF files. I am able to make the conversion but the formatting just does not translate. The entire text...
View ArticleVMM - add recources to user group
Hello,Is it possible to add recources (ie. virtual machine) to a VMM user group via powershell?Thanks
View ArticleIf Else statement
Chaps. The below code is from a much larger script but I have copied it out to just get the logic bit working. To give you some understandingIn C:\ADPictures will be a .JPG that will need to match the...
View ArticleGUI to query AD into a listbox, and then selected item from listbox into...
Im trying to create a GUI that will query AD for users, the display names of the users will go into the listbox. This i have completed. I can't figure out how to select a display name in said listbox,...
View ArticleIssue calling vbs script in powershell script
Newbie here - Trying to call a vbs script in a powershell script and pass it some parameters but I keep getting an error and can't figure out what is wrong. Any help is greatly appreciated!Here is the...
View ArticleCopy item idea
Hey all so I have a script to copy files from 1 computer to others in a list. It works great but I was thinking it's inefficient. I want to be able to copy the item from the original host and the new...
View ArticlePowershell FTP Question
Hello,I appologize if this is in the wrong area so feel free to bounce me if I am.I am making an FTP script to download 5 folders and their contents. So far I have only been able to specify specific...
View ArticleFile font garbled;
Hi I am using run space to run some process against multiple machines and logging info into temp files, and the end of the script am concenating all the temp files into a final log files. But I notice...
View ArticleWhat is difference between these two commands
Command 1 - Add-CMDeviceCollectionDirectMembershipRule -CollectionName "Power Shell Test" -ResourceId $(Get-CMDevice -name client1).ResourceIDCommand 2 - Add-CMDeviceCollectionDirectMembershipRule...
View ArticleIssue with Pasting to Command Line/PowerShell
Hi,We are unable to paste text from an application other than Command Prompt (CP) or Windows PowerShell (PS) to CP or PS.The issue is only occurring on one of several Windows Server 2008 VMs.The server...
View ArticleWhat is the best way to run a powershell script with parameters in the Task...
Hello, Want to run the following from a scheduled task in the Task Scheduler on a server. What is the best approach?.\pscript.ps1 -csvfile "\\Srv1\Share\File.txt"Thanks for your help! SdeDot
View ArticleTelnet using powershell
I have list of servers, which should telnet to an ip address to port 12232, and display the result as Yes, IF the server can telnet to IP address, or NO, when it fails.How do I write a script in...
View ArticleStrange behaviour in "Do - Until" statement
Hi,I'm having a strange behaviour in a script I'm creating. The purpose of the script is to update some files in some folders. In the case that more folders need to use the script, I'm importing the...
View Article