Copy a file and retain the folder structure
I was given a list of 40,000 files to copy from one directory and recreate the to directory in another location. The copy-item does not create the directory so I was going to call robocopy. This...
View ArticleUse Get-ACL and Set-ACL but modify the user.
In the process of migrating a file share from one domain to a completely separate one and need to change the username on the ACL’s. So all the usernames are the same but the domain is different. I...
View ArticleList computers not part of group not working
This is what I have: Get-ADComputer -Filter * -Properties MemberOf | Where-Object { $_.MemberOf -NotIn "{CN=WSUS Servers,CN=Computers,DC=ts,DC=local}" } | select Name | Export-Csv C:Temptest.txt It...
View Articleretrieving user status from a list of servers.
Hi there, I am trying to automate the following: first get a server from a text document with a list of servers. if there is a user logged onto the server, skip the server and go to the next one on...
View ArticleMissing ‘)’ in method call
I’m trying to get this script working to auto-pull our Lenovo machines information and their warranty expiration however when executing I keep getting that error! I’ve tried everything I can think...
View ArticleSplitting on “,” (Lastname, Firstname) with ConvertFrom-Csv
I’m probably overthinking this but I don’t want to write any unnecessary code (it’s a LOT of data so inefficient code could really add up). Basically I’m importing a block of text via a textbox then...
View ArticleRedirect process output to screen AND file
In my PS script I’m starting a process. This process reads from stdin (in my case it’s a file) and also outputs data. How can I display the output in window AND at the same time write this output to a...
View ArticleRemoved app icon remains in Start menu
Hey all. New to PowerShell so forgive me if I’m missing something here. I’m using PS to remove built-in apps plus some games – in this example, Candy Crush. Here’s the Pastebin code. After running...
View ArticleDumb noob question about get-date and get-random
OK, sorry if this is the wrong place to post this. I’m enough of a PS noob that I am not even sure how to phrase this so I’m just going to brain dump… So my developer has created a script. It’s...
View ArticleLogSentinel.com API Function
I am very much interested in blockchain related technologies and discovered this new service built on the ethereum blockchain to store logs (still in alpha). It looks like a really nice platform for...
View ArticleConfig Settings Check
Hey everyone! I’m running through a pretty simple settings checklist script and just hit probably one of the ugliest things I’ve had to work around….Advanced Power Options Settings…. Does everyone...
View ArticleMy first real script! (SQL backup, copy, and reporting)
submitted by /u/IMSJacob [link] [comments] The post My first real script! (SQL backup, copy, and reporting) appeared first on How to Code .NET.
View ArticleQuestion/Help Adding items to a tab in a XAML GUI
I am trying to use a loop to add checkboxes in a tab item but i am getting an error “You cannot call a method on a null-valued expression. At $WPF_ServicesCB_Tab.Controls.Add($ServiceCheckBox)” the...
View ArticleNot what I expected
submitted by /u/pmd006 [link] [comments] The post Not what I expected appeared first on How to Code .NET.
View ArticleMeraki API – Powershell Function
Here is a collection of functions I wrote that utilize the Meraki API. Hopefully someone else can get some use out of them https://github.com/snagler/meraki_functions submitted by /u/JimBob- [link]...
View ArticleVoodoo PowerShell – VisioBot3000 Lives Again! – PowerShell Station
submitted by /u/michaelshepard [link] [comments] The post Voodoo PowerShell – VisioBot3000 Lives Again! – PowerShell Station appeared first on How to Code .NET.
View ArticleHas anyone had any experience with using Constrained Endpoints on a domain...
My boss has asked me to look into consolidating some of our scripting, and the prospect of using PoSH constrained endpoints to delegate access to certain internal modules seems to be exactly what...
View ArticleQuick question about adding to an object.
I’m putting together a termination script, and as the script is going and finding various services it’s adding notepropertys to a custom object. Later, I’ll use that object to perform the actual term...
View ArticleTrying to use format-table with pscustomobject foreach loop
So I’m trying to query our AD server for a specific OS type and check to see if they have a service installed (don’t care about started/stopped at this point, but that’d be nice too). I’ve got...
View ArticleDisconnect users with Idle time greater than or equal to 1hr
I am writing a script that will filter the servers based on whether there are users logged in or not. If there is no user logged in, the script will export the name of the server to a text file. If...
View Article