Sort Object with Numbers After a String
HiI am having trouble sorting objects with numbers behind. They are not in chronological order$string = @@("server-11", "server-12", "server-1", "server-2", "server3-3")$string | Sort-ObjectGives you...
View ArticleNeed to combine stings with number appends to count up on a loop
Hi guys i need the number on the end of this to come out as 01 so as it grows it can go into double digits ( and looks better :P)$I = 1 Do { $I.ToString("00") # CONVERTS TO TWO NUMBER VALUES...
View ArticleQuery Computer details from multiple domains
I have list of computers in text file. Computers are present in different domains (xyz.com / abc.cm).Want to query servername,Uptime,OS version by using a script from any of domain group computer. I...
View ArticleHow to verify .NET version from remote list using Powershell
I'm trying to get a simple yes/no answer from a list of servers I've put on a text file. I need to know if they are running a specific version of .NET. The results I keep getting are from the local box...
View Articlecan we copy directly the folder?
Hi Guys,I'm quite new to scripting, my question is, can we access the following path AppData\Local\Microsoft\OneDrive\settings and make a copy of the content in settings? As far as I understand you can...
View ArticleGet-Date adding to out-gridview
Hey,, Okay, yes, I'm newbie.. I have this Line:get-VM | Where notes -match"firmaid: 336" | select * | out-gridviewAll I want is to add the date of today, to the Out-Gridview It's okay if date is added...
View ArticleRun Powershell script as Scheduled task, that uses Excel COM object
What am I missing here.. I have Powershell script that uses the Quest AD cmdlets to get computer information from AD and populate an Excel spreadsheet with the data.The script works fine, so I created...
View ArticleXML Text Within Tag Name
Hi,I am trying to programmatically extract the name and value within a tag on an XML file. For example, using the following XML I want to extract the name "language" and the value of language...
View ArticleConnect Exonline using window powershell instead of using "Exchange Online...
I followed the this article to connect to exchange online from local windows powershell but it fails.I tried adding the below profile to connect exonline but it does not work. it throws error...
View Articlerunning single script for multiple domains
Hi There,The script below only able to change account expiration on specific domain which I'm running in. I have multiple domains and I'm dont want to run them separately. How can I include multiple...
View ArticleGet-ntfsaccess results different
Good morning,I'm trying to extract results from a get-ntfsaccess command and faced a small disturbing issue.When I use the command to get the result on screen, it goes as this:Get-ChildItem...
View ArticleFind directories with certain name and check if contains data
Could you help me on building a Powershell script to do the following? In a certain folder structure check if the "Old projects" exists and if it is not empty tell the user of the script how many...
View ArticleOptions to monitor any instance of Powershell
I am looking for an option, native or 3rd party, to monitor any instance of powershell on a workstation.Plenty of information for using powershell to monitor, but not much for monitoring powershell...
View ArticleTrying to create a table
The part of this that works to gather the data is:$Connection = Get-DfsrConnection $Connection | ForEach-Object { $Source = $_.SourceComputerName $Group = $_.GroupName $Destination =...
View ArticleFormatting Invoke-WebRequest from portal to CSV
Hi Folks,I am using Invoke-WebRequest -Uri "https://endpoints.office.com/changes/worldwide/0000000000?clientrequestid=b10c5ed1-bad1-445f-b386-b919946339a7" to fetch data from a office portal and need...
View ArticlePowershell to get the Registry key value from remote server with txt file
I am trying to get a registry value from the remote servers from the txt file and getting the error the value is name of productand getting the error below .. script below with error at the end , Can...
View ArticleGet-ADGroupMember calling a DList with long name and special characters
Hello, I am having difficulty exporting a list of all members from a distribution list. The dlist essentially contains every single member of a large organization. The name of the list is very long (65...
View ArticleTrying to parse together csv..
Hi,First of all I am not a scripting dude:) I have basic knowledge, and trying to put things together :)My goal is the following.We have a group called "OPERATION ADMINISTRATORS", this contains a set...
View ArticlePowerShell xml parsing script change encoding
Hi guysI have an xml file with Shift-JIS encoding inside, there are Japanese and English characters, and after succesfuly parsing this file I see Japan characters broken. Can anyone help me to...
View ArticlePowershell script displays Disabled and enabled Users - Receiving error that...
Hello,I currently have a PS script that shows Disabled and Enabled users within Active Directory. Everything works fine; except for the fact if the user does not exist, it will display the following...
View Article