Questions tagged [powershell-v5.0]
58 questions
0
votes
1 answer
Difference between two powershell scripts
I received a script that is supposed to scan the event logs of 4 DCs, searching the event ID 4740 (user lockout). This is script number 1. Now I thought to myself, "Why scan all the DCs when I can scan the log of the DC that runs the role PDC…

Eli Bukin
- 1
- 1
0
votes
1 answer
Error when importing certificate via PowerShell to Local Certificate Store. Missing PrivateKey Information
I have have tried the following ways to import a certificate to the localmachine store via PowerShell. The console was running as administrator.
Import-PfxCertificate -Exportable -Password (secure.string) -CertStoreLocation Cert:\LocalMachine\My…

Jessie
- 182
- 1
- 13
0
votes
1 answer
Send-MailMessage thorugh Office 365 operation times out
I need to send an email report from a script. If I do this from one of our mail relays the email appears as [EXTERNAL]. Since this report includes links, I want users to trust it as coming internally.
I therefore want to use the…

neildeadman
- 684
- 4
- 20
- 34
0
votes
1 answer
Powershell - Get-ADOBJECCT Trying to show a subset of values of a custom class
Here is my script that works great:
Select-object -Property name,@{Name="bofaamlmember";Expression={$_.bofaamlmember -join ";"}},@{Name="canonicalName";Expression={$_.canonicalName -join ";"}} | Sort-object bofaamlmember | Export-Csv…

ChadKFranks
- 5
- 2
0
votes
1 answer
How to install DFSN module in powershell?
I have two machines, one has DFSN available (functions like Get-DfsnFolderTarget, etc) and the other doesn't.
I can't seem to find any information online about installing it, and I'm not a powershell expoert. I found references to the powerhsell…

Austin Witherspoon
- 1
- 1
- 2
0
votes
1 answer
PowerShell, Active Directory Get-object issue
I have been tasked to create a list of members of a custom object/custom attribute in Active Directory. I felt the best way to do so is use PowerShell. I can list the objects in a specific OU, but I cannot drill down further to get the…

ChadKFranks
- 5
- 2
0
votes
1 answer
Service Account Permissions for Task Scheduler READ
I have a PowerShell script I've written to do a comparison of Scheduled Tasks between two nodes of our application server cluster. It uses this code to query the tasks from a given server...
function getTasks($server) {
return Get-ScheduledTask…

eidylon
- 358
- 1
- 7
- 20
0
votes
0 answers
WSMAN error using Register-PSSessionConfiguration
Windows Server 2016 v1607 Build 14393.3930
PowerShell 5.1.14393.3866
This is a Google Cloud VM
I am teaching students some basic PS Remoting. Set up a simple DNSOps group and use ps-remoting to show how the non-admin user can do some admin…

Dave Cushing
- 1
- 1
0
votes
1 answer
Automating the downloading of data from a website
I am writing a powershell script to extract data from OpenStreetMap automatically for a country. My whole script is written, but not quite functional. My script below:
$ie = New-Object -ComObject InternetExplorer.Application
$ie.Visible =…

ptushev
- 3
- 3
0
votes
1 answer
Executing Remote commands on target machine via WinRM in workgroup environment
I'm looking forward to run special commands on a target machine in my local network (workgroup, no domain join).
The machines have been previously configured with Enable-PSremoting etc.. to tolerate Windows remote management so that we can execute a…

Andy McRae
- 125
- 1
- 8
0
votes
2 answers
delete unnecessary settings from GPO
I want to delete some unnecessary settings from one GPO. I use windows server 2016, and i have unnecessary registry settings which i don't want to appear in my GPO.
It is possible to perform this action.I have try to edit this policy (right…

bogdan09
- 3
- 2
-1
votes
2 answers
Powershell script Needd to set the state of Allow Remote Shell Access
I am looking for a script which will set the value to "Enable/Not Configured/Disable" of Allow Remote Shell Access in Gpedit via Powershell script.
Below value state value should get changed to Disable via PS script
I know I can use get-gpo to…

asur
- 101
- 2
-1
votes
1 answer
How to change IP Address of remote VM with Powershell?
I am creating an auto-build process in Powershell and need to build a VM with a static IP address. The VM gets built by the script and is assigned a DHCP IP Address. I can query the Hyper-V host to get the IP Address of the newly created VM with…

Mark Allison
- 2,188
- 7
- 26
- 45