Multiline string to pscustomobject
Hello, how do I get multiline string into pscustomobject, as I get by import-csv cmdlet?$source = import-csv .\source.csv -delimiter ";"CSV: PhysicalServer;VirtualServer;ilo server1;virt1;10.0.0.1...
View ArticleVM information
Trying to extract VMs with outdate Tools and other information.I am using the following command:get-vm | where {$_.powerstate -ne “PoweredOff” } | where {$_.Guest.ToolsVersionStatus -ne...
View ArticleQuerying GetDnsServerSourceRecord.RecordData / CimInstance#Instance data in...
I'm trying to query the RecordData property of a zone I've retrieved using Get-DnsServerResourceRecord. If I query any of the other elements things work fine, so for instance I can run...
View ArticleRobocopy Files Selectively
I have a requirement to copy files from one location to another. I am accomplishing this task using RoboCopy.robocopy $item.FullName $destination /E /XO /R:2 /W:2 /MT[:n] /LOG:$log_filesUnfortunately,...
View ArticleInvoke-Command on Remote Machine Causes "fatal error C1060: compiler is out...
Error does not happen when the exact same Invoke-Command is executed on the local machine. Invoke-Command starts a batch file which launches the compiler. When building the same .exe locally the...
View ArticleSetting remote registry value script
Hi,I am trying to set the following registry values on 20 remote machines. Need help in pushing through a powershell script.[HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet...
View ArticleException while trying to get the Team Project Collection by passing the...
$TfsUri="https://abc.visualstudio.com/defaultcollection" $username = "XYZ" $password = cat D:\securestring.txt | convertto-securestring $cred = new-object -typename...
View ArticlePowershell to get-acls get-acl id from database table and insert ID on...
Hello all,Here iam again. Would like some help on How can i implement the following:I have a few shares on the network. I ll get all the folder and file permissions with get-acl and get that info to a...
View ArticleCreating a Variable based on files seen when doing Get-ChildItem
hi guys, I have trawled the WWW for answers to this annoying issue, of which when thinking about it should be simple enough to accomplish.Scenario:To automate a VM build, a system we use pumps out an...
View ArticleNeed to create a PS to Start and stop service with UI console
Hi All,We have created a UI for Basic administration. Requirement is when we select the services in UI and execute the the Start button. The powershell script should fetch the Input from UI as CSV...
View ArticleSelect specific string with line break
Hello all,I would like to only select "CN=*whatever*" from the line below> C:\test\temp_523410.txt:18:Subject: C:\test\temp_523410.txt:19: CN=domain.local C:\test\temp_523410.txt:20: O=Test...
View ArticlePSHostUserInterface and Windows 10/PowerShell 5.0
Hello, we're currently working on an application that hosts a PowerShell runspace/pipeline and executes PowerShell scripts. Now there's something my colleague and I noticed which we can't explain. The...
View ArticlePowershell script to get the list of all users with groups they are member of
HiI need a list of all users in AD together with the groups they are member of. I'm new in powershell and trying to produce the result I need. I've come up with the below script but it didn't show...
View Articleget the user who is running a process
Hi, I am trying to track down the list of the processes that are currently running for more than 30 minutes. I was able to get the starttime, commandline etc. by using the following code, but I was not...
View ArticleRead remote registry values
Hi,I want to check if the following dword in registry is set to "00000020" on 20 remote machines. How can I remotely read from script and if found it can show that the value is set and if not found it...
View ArticleAD Module takes so long
HiI have a few scripts I use to query active directoryTo make available all the ad cmdlets I have to put import-module activedirectory at the beginning of each ps1 fileits a bit of a pain watching that...
View ArticleList and Compare 2 AD user's full attributes set
Hi guys,I am wondering if some one can help me get the logic right in order to compare 2 ad users side by side. Basically I would like to list out all the properties of the AD user object and compare...
View ArticleIIS: Encrypt password in /location/system.web/identity
Trying to add a user/password pair to IIS applicationHost.config at/configuration/location/system.web/identityI can only add the password as a plaintext value (moving this out of the application...
View ArticleGetting DFSR setup with PS
I'm trying to automate the configuration of DFSR and am having a tough time. Setup is pretty straight forward, two DC's holding the namespace and two member servers for the DFSR setup. Ive read this...
View ArticleExport get-childitem to csv using too much memory
HiI am trying to run the following scriptGet-ChildItem -recurse | select-object DirectoryName, Name, LastWriteTime, Length | Sort-Object -Property DirectoryName,LastWriteTime | Export-Csv...
View Article