Split one large string into lines
Hi,I have one large single string that I need to split into lines at a certain point so that I can run some logic on it. Â It is pulled from a webpage using:$webclient = New-Object System.Net.WebClient...
View ArticleFast way to parse string
I need to parse the string on this webpage: http://finance.google.com/finance/info?client=ig&q=GOOGI can use functions like IndexOf, Substring, Trim, Split and so on. But I am wondering if there is...
View ArticleIterate through PSCustomObject for report creation
I'm putting together a server reboot script that pulls from SCOM and outputs a PSCustomObject containing ServerName,SCCM MaintenanceWindow, PingCheck and LastRebootTimeStamp.I'm just unsure of what the...
View ArticleCompare two different drive contect and move but get file does not exist
Hi Guys, $sourceItem = Get-ChildItem $source -recurse -Filter *.txt* $targetItem = Get-ChildItem $target -recurse -Filter *.txt* If (-not $sourceItem) {$source = @()} if (-not $targetItem) {$target =...
View ArticleGet-Date error
Why the first line gets error but others do not on Windows 10 ?Get-Date 'Feb 22, 11:40 AM' #get error Get-Date 'Feb 22, 11:40 PM' #no error Get-Date 'Mar 4, 7:41 AM'Â Â #no error Get-Date 'Mar 4, 7:41...
View ArticleUpdate file content using powershell
I have a .conf file. The file has the following lines:ABCDEFGHXXXYZI tried the following powershell command but didn't work and I think the reason is it is a .conf file not a .txt file(get-content...
View ArticleAdd lines to the end of a configuration file
I tried add-content command to add the following lines to a .conf file but didn't work, I think the reason it didnt work is because the file is not a .txt file, it is a .conf file.[sslConfig]...
View ArticleUnable to get each Mailbox size from the below Exchange Server statistics...
Hi,Can anyone here please assist me in modifying the below script to display the total capacity of the mailbox database:$xDays = 365 Get-Mailbox -ResultSize 50 -RecipientTypeDetails UserMailbox |...
View ArticleChange color of text in listbox based on the value
Hi,i need to change the color of text in a listbox based on its value.Here is a simple version of it (not working)function Convert-XAMLtoWindow { param ( [Parameter(Mandatory=$true)] [string] $XAML,...
View ArticlePowershell copy NTFS rights
In our company we use robocopy to copy folders with their NTFS permissions. But after some research we found out that powershell is way faster for copying folders over to another server. Is there a way...
View Articlegroup member search in entire forest including child domain as well
Hi I am using below script to get the group member search. This script is taking time.. Any idea to modify it or get more fast search script..I have 4 child domain and 2 root domain in single forest....
View ArticleRemove blank (lines) from an array
I've tried everyting it just down't seem to work: #Combine both result arrays $result $lines = (($result -replace '((udp|tcp) \d{3})', "`$1`n") -split "`n") foreach($line in $lines){if...
View ArticleReport on remote users mapped drives
After a very thorough search, I can't find anyone else who has had this question answered.I have a need to on-the-fly report on the mapped drives and their letters of users on remote computers. Running...
View ArticleThe computer-specific MOF file for computer 16srv03 does not exist in the...
My goal is to install webserver on 16SRV03 My pull server - > 16Srv52 (I have mof and checksum file) All servers are 2016 Server I am running the below on 16SRV02 and i get error"The...
View ArticleAudit Offie 365 distribution groups created by user and force those group...
All the distribution groups created by users appearing GAL which is causing problem. i tried users to create goup private only but is not possible with current office 365 product.I am looking for a...
View ArticlePowershell ISE bugs?
Using PowerShell 3.0 ISE on Windows Server 2008 R2 with the latest service pack. Copy and paste within a PowerShell ISE window or between windows or from the ISE to anything else only works...
View ArticleNeed help with text file parse
I know powershell (enough to get my by); however, i have ran into an issue in which i cant even find the answer on google.. I have this test.audit file (for example) that...
View ArticleHow can I edit firewall rules inside of a GPO using powershell?
Hi! I know how to edit firewall rules via powershell on a local machine. How can I go about editing firewall rules that are specified in an group policy?I know I can just edit them via GPMC, but I am...
View ArticleWindows Powershell ISE unable to load Exchange Server 2010 Powershell ?
Hi people,When I executed the below two lines in clean install Windows 10 laptop on Builtin Powershell ISE:import-module Microsoft.Exchange.Management.PowerShell.E2010 add-pssnapin...
View Article