Export-CSV avoid unnecessary quotations
Hi All, I'm exporting a table from SQL DB using Export-CSV cmdlet. There are various columns that may contain comma(,) in between. When I export the table to CSV using Export-CSV command, the file...
View ArticlePowershell against wim images
Hello there is there a possibility to use powershell to recover additional infos about wim/mounted images? I know that there are DISM Cmdlets and the DISM utility by itself (i use them normally) but...
View ArticleWindows PowerShell Script Help
I found a Fourm that had a post on it by Richard Mueller that had a script he posted to help setup automation of adding users to a group with a PowerShell Script. The script works great, but I want to...
View ArticleSplit & Trim
I am looking to convert a comma delimited list into an array, and the list may or may not also have white space around the delimiters for readability, so I want to Trim post Split. Also, I am just...
View ArticleCompare two text files in Powershell and if a name is found in both files...
Is it possible using PowerShell to compare the contents of two text files line by line and if a line is found output that line to a third text file?Lets say hypothetically someone asks us to search a...
View ArticleHow can I measure GPU load/usage?
I have a GPU bound application I want to write a watchdog for. To do this, I need to monitor the GPU usage. Is there a way to do this in PowerShell (WMI, Win32, etc.)? I am running Windows 8.1...
View ArticlePowershell if/else statement
Hi,I hope this is the correct forum for my question. I am trying to write a script that tells me what the status of a hyper-v integration service is on a VM and then disable the service if it is true....
View ArticlePopulate a dataset in a foreach loop
Hi,I am trying to populate a dataset in foreach loop, but I have difficulties getting it working.I have a set of plan_handles in a dataset. Now I want to go through them and execute a query to get the...
View ArticleTrying to add Domain Global group to a remort machine local group in the domain
Hi, This is rohit. I am currently trying to add domain global group (Desktopgr) to my local group (Localgr). Let me pricise this in more details: I had a machine 2008 server (LDAPCLIENT, ip...
View Articleupdating multiple fields, set-ADUser, missing an argument
It's late and I'm probably not seeing something obvious. Trying to run this script for updating multiple AD fields on a list of users.Would anyone be interested in giving a lesson on what I should be...
View Article[BUG] in Add-Type cmdlet using parameter set FromMember
The cmdlet Add-Type with parameter set FromMember is mixing the variables through the parameter -PassThru.See this code:$code1='public static double Probability { get; set; }' $obj1=Add-Type -Name...
View ArticleUpdate-TypeData: how to make NoteProperty read/write?
$obj=New-Object -TypeName datetime $obj|Update-TypeData -MemberType NoteProperty -MemberName Probability -Value 100 $obj.Probability=0 # Error! How to make it read/write?
View ArticleEmbedded Period Regex
I am trying to parse out words from a file using:$string = "Ziggy Ziggy.stardust Ziggy."$string -split "\W+"ZiggyZiggystardustZiggyI want to be able to have output as follows (i.e. don't split on...
View ArticleBuild numbers for powershell.exe vs. PowerShell version
Hi!I'm looking for information about powershell.exe file build number or version than can allow mi determine installed PowerShell version on remote hosts.Currently I must determine installed version on...
View ArticleInventory computer
Hello,I have a scriptthat canmake an inventory ofcomputers and put in excel,onnec vl370no problemeverything works , onlenovo,if I want to knowthe typeof processor and thehard disk...
View ArticleModifying Settings on a device with Set-WMIInstance
Hi all,I am trying to modify a paramter from a FC HBA on a WS2012 host through powershell:Set-WmiInstance -Path...
View ArticleParse Windows login event for specific details
Hi,I have a windows event that I want to search for in the event log using Powershell. I've got the basics but can't find how to drill further into the details. This is what I have so...
View ArticleRemove all groups from one user
I need a Powershell script using native or Quest cmdlets to remove ALL groups from a user in AD. Now here's the catch, the user is a member of groups from 3 different trusted domains in a single...
View ArticlePowershell to create audiences in SharePoint Online
I couldn't find a PS cmdlet to create audiences in SharePoint Online. Is there any PS sample to create audiences in SharePoint online?
View ArticleHelp! I can't get console output to text file to format properly!
When I run my PS script, the console output looks like: Item1 Item2 Item3 When I try to send the output to a text file with Out-File, I get: Item1Item2Item3 I have tried every combination and...
View Article