foreach within powershell
Hello all the good guys for making things easier for other good ones :) Can you please help me with below? Something simple but just cant put it together for some reason while I have used it prior...
View ArticlePowershell: Getting current logged on user
Ok, this is a little more difficult than the title makes it out to be. I know $env:username will get me the user. Unfortunately, that's not the user I want to get when I'm in an elevated ps window....
View ArticleJava Script Installer help
Hey guys, I dont receive any errors, but nothing happens when I run the script. Any help would be awesome! Thanks guys! $ScriptBlock = { param([String]$strComputer, $FileList, $scriptpath) function...
View ArticleUsing a CSV to fill in a variable for a command on powerscript
I'm trying to get this done and am having a massive brain fart. Yes work after Thanksgiving sucks. I have one file I am trying to copy onto all the desktop workstations. I'm in powershell running this...
View ArticleCreate event log
Hi! We have a fileshare and i started to audit file deletion. It works well but unfortunately too many events gets into the Security event log and it only keeps about 5 hours events. (the size limit...
View ArticleReplace all child object permissions Powershell
How would I enable the option to replace child object permissions with the parent permissions on a folder. Attached is a script that takes every folder in a directory and applies an admin account to...
View ArticleDelete a Reg Key with Powershell
I am trying to powershell Option 6. We have a lot of cloned VM's that have the same...
View ArticlePowershell Export-csv to force overwrite
I have a successful script that takes up some data analysis from local machine and exports a csv file at the end. No issues there. Problem is that if someone has that file open, and at the same time...
View ArticleUsing GroupName instead of UserName in PowerShell
I am trying to get the following script to log off users in a security group. Get-TSSession -ComputerName Server1 -UserName test | Stop-TSSession -Force The problem is I'm unsure how to call the group...
View ArticleChecking multiple domains for enabled account
So here's what I'm trying to accomplish. I've got to look for domain users created in the last four hours, search another domain for that username, and then compare both domain accounts to see if both...
View ArticleCopy-Pasted Powershell Script won't run
Hello, This is a pretty simple operation and I'm a bit embarrassed I can't make it work. I'm running Powershell 2.0 and attempting to modify a user's mailbox size. The mailbox is hosted in a...
View ArticlePowershell Regular Expression
Having a bit of trouble figuring out how to use regular expressions in powershell to get a username from a log file that can vary in length depending on the username. The log file looks like this:...
View ArticleA script to pull application settings
We are running Simpana Commvault 9 in two remote environments. We are attempting to establish a baseline configuration between the two sites and wanted to create a script that can run a comparison...
View ArticlePowershell: Reserving and using white space
So, as we all know there's a good amount of IP addresses out there. The script I've been working puts these into a table that has to be manually formatted due to some silly reasons that I haven't been...
View ArticleCreating Powershell Active Directory Users by OU
can I get some direction on how to create a user, set to particular OU with powershell? I have one core server and cannot use the GUI nor install it for this customer. Is there a script out there ?
View ArticlePowershell script to eject USB device?
Is there a way (with out installing 3rd party software) to use powershell to eject a USB device?
View Articleproblem with a script
hey all, I am having a problem with a powershell script that runs as a logon script in AD it seems that sometimes it runs, and some times it doesnt, and i am at wits end with it. its job, is to remove...
View ArticleWhat is Domain\!username?
I am looking at the Powershell Deployment Toolkit and looking at tweaking the Variables.xml as explained in...
View ArticleCan't display properties of an object for some reason
I'm a bit baffled by this. I can get it to work just fine on my local workstation but when I try to do the same thing on a win server 2008 r2 box it just doesn't work - no error or anything. Basically...
View ArticleRenaming folders in bulk
I'm having a headache trying to wrap my brain around this- for my radio installers group, I have to rename roughly 25K folders from "[location] job site-date" to "job site-date [location]" The folder...
View Article