Reply To: PasswordLastSet subitem.add
Will do. Now having issues with a 3rd column, description heading and data is all blank. Also Get-QADUser -searchroot “OU=x,dc=x,dc=x” -locked -IncludedProperties PasswordLastSet | ft displayname,...
View ArticleReply To: PasswordLastSet subitem.add
Managed to resolve the column issue. Still having issues with the date formatting on passwordlastset
View ArticleReply To: PasswordLastSet subitem.add
All sorted. Ta $item.SubItems.Add(($luser.PasswordLastSet | Get-Date -format “dd/MM/yyyy HH:mm:ss”))
View ArticleReply To: splitting path using powershell
In addition to what has already been suggested, maybe you could benefit from something like this: $pathParts = $path.Split([system.io.path]::DirectorySeparatorChar) That would put the different parts...
View ArticleReply To: splitting path using powershell
You could also use Join-Path to create the destination
View Articleset-wmiinstance
Good morning, I am trying to add an asset tag number to Win32_SystemEnclosure.SMBIOSAssetTag. This is what I am running and the results I am getting PS C:\Windows\system32> Set-WmiInstance -class...
View ArticleReply To: set-wmiinstance
According to get-member the property can be set SMBIOSAssetTag Property string SMBIOSAssetTag {get;set;} BUT if you use get-cimclass to dig into the class information £> $class = Get-CimClass...
View ArticleReply To: set-wmiinstance
Yeah, there’s kind of a difference between WMI – which is technically willing to set any property on any class – and what the underlying code/hardware actually permits. WMI is happy to send the “set”...
View ArticleReply To: Powershell menu , multiple choice (cli)
You’d have to code all of that yourself.
View ArticleReply To: Powershell menu , multiple choice (cli)
yep, just wondering if it’s possible to do any kind of checkmarks… My limitation here is that I am working with Powershell for Web Access which does not allow popups. I will be attending TechMentor in...
View ArticleList view issue
Hi, just having an issue displaying output in listview. Want to get dc server name in column 1 and site in column 2. Below shows all the data, but all in column one. function updatedclist { $Config =...
View ArticleReply To: set-wmiinstance
Hmmm, so would you have any suggestion of where I can store an asset tag?
View ArticleReply To: List view issue
I’d look at getting your data in a manageable format and then add it to the list. This will give you an output of DC and site Get-ADObject -SearchBase “CN=Configuration,$(Get-ADDomain | select...
View ArticleUsing CIM to create a shared folder
Hi, I’m trying to create a shared folder in PowerShell with the Everyone group set to Full Control. I’ve previously done this in the past using WMI, but I would like to try and do this using CIM This...
View ArticleReply To: Installing .MSU Via Powershell & PSexec
Hey Peter First am sorry for the late reply and I want to thank you really for your great help I’ve tried the second script you wrote and it didn’t work as I wanted. The idea of extracting the package...
View ArticleSearching for device information
Hello, New to the PowerShell in general and a complete dunder with scripting. Can access generally most of the information I require [thank you MVA Advanced Tools & Scripting with PowerShell 3.0...
View ArticleReply To: Compare two locations, report on differences
I’m sure there’s a much more elegant way to do this, but this code will work for you: $path = “C:\temp\TF.iQmetrix.CheckinPolicies.txt” $patterns = @(“test”, “is”) # Get all of the lines contains one...
View ArticleWrite-Host vs Write-Output
Mr. Jones from what I have watched or read states that he likes the write-output over the write-host and I understand the reason (object vs text to screen), but what if you wanted some of the benefits...
View ArticleReply To: Write-Host vs Write-Output
He just talked about this yesterday in one of his TechEd presentations. He does agree that there are times where Write-Host is the command to use if you need color coded fonts or something like that....
View Article