Remove Group From A Single OU
Hello - I was wondering if someone could help me figure out how to remove a group from an OU.There is a security group that got accidentally added to all the users in an OU...how would I remove just...
View ArticleXAML GUI to run Powershell scripts for New-Ad User
Hi,I'm still new on the power of powershell (pun not intended) and I've been playing around and want to create a GUI/Front face for the powershell script to speed up creating a new user within AD. I've...
View ArticlePowershell help - Copy AD secuirty group permissions to new group
I am looking for a way to use powershell to copy permissions from old security groups to new security groups to avoid manually doing it.we have new security groups in place and want to copy permissions...
View ArticleOutput to a single file
I am sure that I am just putting something in the wrong spot. I have a script that checks multiple servers for their product key. I have been asked to do this by my boss but he wants it in a single...
View ArticlePowerShell: Write-Error inside Do/While
PowershellDo{$DC=(Get-ADDomainController-Filter{IsReadOnly-eq$false}|sortname-Descending|select-Skip$DCIterator-First1).nameIf(!(Get-ADUser$SamAccountName-Server$DC-ErrorAction'SilentlyContinue')){Writ...
View ArticlePowerShell msiexec and -ArgumentList
Good afternoon,I am attempting to install Kaspersky Network Agent and Kaspersky Endpoint Security via script. Mostly because Kaspersky's install process from their console is horribly slow (like over...
View ArticleConverting Exchange contacts to Exchange users using PowerShell
I am converting 250 Exchange 2010 contacts to Exchange users. I have researched and am very close to a solution.This is my command to export the contacts;Get-Contact -organizationalunit...
View ArticleOffice365 Powershell command help
I am trying to create a powershell command to disable clutter for all users in our Office365 account with a certain domain. Googling has led me to 2 command that both work independently of each other,...
View ArticlePowershell showing "how do you want to open this file"
When I use PStools or one of my own .ps1 scripts in powershell I get the prompt "how do you want to open this file". I want the file to run in powershell like it always did before. This happened...
View ArticlePowerShell Format-Table ForEach Loop
Good evening,How on earth does one add a new line to a table within a foreach loop without the resulting variable output being overwritten every time the foreach runs?Guessing I need to store it in an...
View ArticleHelp To Export Results To CSV
Afternoon all, Can anyone help me, I am trying to output the below data into a CSV.dir -recurse c:\temp | Where-Object { $_.PSIsContainer } | Where-Object { $_.GetFiles().Count -eq 0 } |...
View ArticleNew-ADUser error
I'm playing around with Get-ADUser and New-ADUser as a method of creating new accounts from template accounts. Here's what I'm...
View ArticleRun a script for user objects in a specific OU, but exclude a few OUs in that OU
Run a script for user objects in a specific OU, but exclude a few OUs in that OU While the script I have setup doesn't give me any errors, it's not filtering out the OUs I have named in them. I'm...
View ArticleRename-Computer with Startup Script
Essentially I am attempting to rename computers to a generic standard of [CompanyInitials]-[SerialTag] (i.e ABC-J45TYF7) using a GPO with a powershell startup script. My goal is to not have to manually...
View ArticleStart a SQL Agent Job with Powershell
Hi,Can somebody please direct me to some documentation on how to start a SQL Agent Job via Powershell? I would like to start the job at step entered by user. If no step entered, then start at the first...
View ArticlePowerShell Registry Access failing
I've been using the very helpful PSRemoteRegistry module to gather information from multiple servers on my network. However, I've found that it throws an error when requesting Registry information if...
View ArticleExecution Policy Question
Here is the scenario, we have via GPO all PCs locked down to require AllSigned.The help desk however needs to things that require the AD Module. When they try to load it they get the expected "blah...
View ArticleCheck a PowerShell script line against a txt file containing computer names
I need to check the following code against a txt file with computer names, so if the computer name exist in the file, it'll be copied to the shadow...
View ArticlePowershell Crash
when i run this code under 1000 machines in Ad it runs fine, over 2000 it crashes powershell every time. any one know...
View ArticleDelete all emails from exchange 2010 mailbox that are older than 14 days
Hi Could someone possibly help me I need a script that will do the following:- 1) Delete all emails from a exchange 2010 mailbox (inbox) that are older than 14 days - so I am just left with new...
View Article