adding local users to local groups on a server via CSV
Hey guys,First, I am sorry if this is just completely dumb request, not much experience with this. if you have a moment can you take a look at the script. It’s designed to add a local user to a single...
View ArticleGet Powershell to fill in missing IP’s
Im very new to powershell, so please forgive if simple answer. I have 2 Preset Values $First = 192.168.1.1 $Second = 192.168.1.254 I want power shell to output a .txt file with those Ip’s and the ones...
View ArticleReplacing periods with spaces, apart from the last period… in multiple files
Hello, I’ve been playing around with some automation for bulk-renaming of files. It’s my first time using power shell. As the title says, I want to rename multiple files to remove periods and replace...
View ArticlePassing network location to msiexec
Im trying to install an msi through msiexec but the location of the file is stored on a network drive. I keep getting this error: Start-Process : A positional parameter cannot be found that accepts...
View ArticleFor all you Office 365 admins, this simple script restores the sync-and-wait...
When Azure AD Connect updated a few months ago, it broke a number of our account creation scripts. The new PowerShell commands that initiate a delta sync or full sync don’t halt script execution until...
View ArticleHow can I manipulate strings within an existing object?
Hi there. I’ll try to explain as best as I can the problem I am facing. Please let me know if I’ve omitted anything that could help you understand the problem I am trying to solve. So I’m working...
View ArticleIf Selection trouble
Hi Wizards, A Colleague and I have been working on PS Scripting for Automating our work, we’ve got serveral scripts under our belts but are having trouble with our current Project. Combined we’ve sunk...
View ArticleCreate New Active Directory Users in Bulk with Password verification
submitted by /u/signalwarrant [link] [comments] The post Create New Active Directory Users in Bulk with Password verification appeared first on How to Code .NET.
View ArticleRunning multiple jobs at once
I want to be able to start and stop multiple azure vms at the same time is it possible to run those in parallel? Stop-AzureRmVM -ResourceGroupName $rgName -Name $vmName or Start-AzureRmVM...
View Article[Question] Will this work to uninstall multiple applications?
Hello /r/PowerShell! I don’t have the capacity to test this outside of production, so I’d be glad if someone more experienced could look at that script and tell me if it will do what I need it to do....
View ArticleOverloading scriptMethod definitions
Hi, I’m looking for a way to change the signature of a custom script method attached to a PSCustomObject here is what I’m working with : $Property = [ordered]@{} $Property.Name = 'toto'...
View ArticleNeed to run a script as a different user. but how?
Hello there! I’m currently working on a CI/CD pipeline for our TFS-enviroment. I’m totally new with this, since i’m an apprentice in a other department and got the chance to have a look into our...
View ArticleSetting ACL Permissions
Hello, I am trying to write a script that gives full control to IIS_IUSRS on multiple folders. The server is 2012R2 and the script is as follows: Script The problem is, I get this error… Exception...
View ArticleMalware Win32/Zlader.L Affecting Folders and File Shares – Quick and dirty...
Quick and dirty fix for Malware Win32/Zlader.L seen out in the wild today; feel free to re-use and improve this was written on a major incident today. Remove-Item -Path $FolderName -Confirm:$False...
View ArticlePOSH screwing around
What are some things you have done while screwing around with POSH? I personally hate getting to HP’s page looking for drivers… Their page always seems broken! I added this to my profile because I...
View ArticleMoving users to a new OU
I have a script to run when a user is terminated. One thing the script does is move the user to a ‘Terminated Users’ OU. There are multiple ‘Terminated Users’ OU depending on what part of the company...
View ArticleMultiple $true checks
I’m looking for a cleaner way to check if multiple variables are True. I know I cann do if ($var1 -eq $true -and $var2 -eq $true) But I’d really like something more like if ($var1 -and $var2 -eq...
View ArticleOffice 365/Exchange – Remove user from all groups
I’m working on an offboarding for my company and for the most part it’s all going pretty well. I have all the AD actions down well enough and even the majority of my Exchange tasks work as expected....
View ArticleCreate Directory over WebDAV
I’ve spent the last few hours working on this trying to get it to work, but unfortunately I’ve hit a roadblock and my good friend Google hasn’t been of much help. My goal is simple: I want to open a...
View ArticleScript to save attachment from email
So I’m learning powershell right now and I’m trying to put a script together that saves a CSV file from an email to a network folder, and then reading that CSV file and piping a certain column to...
View Article