5,455 questions with Windows Server PowerShell tags

Sort by: Updated
1 answer

powershell - NTFS permissions

Hi Everyone I need to create a script that will set NTFS permissions on files og folders. Its important that the script only adds permissions. I am struggeling a bit getting it to work. I have made many changes to get it to work, but i end up the…

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-26T13:34:47.93+00:00
Kenneth D 1 Reputation point
answered 2020-08-26T15:04:45.707+00:00
Rich Matheisen 45,831 Reputation points
1 answer

Print Spooler

Hi, I need to create powershell to monitor print spooler which is keep on stopping. The conditions are for the ps to restart print spooler 3x before alert is being generated in scom. Below are my initial scripts. (Sorry I'm super newbie in…

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-18T10:25:46+00:00
Ezad amir 1 Reputation point
commented 2020-08-26T01:49:54.19+00:00
Ian Xue (Shanghai Wicresoft Co., Ltd.) 34,191 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

PS script running as a service

Trying to get a script to run as a service using NSSM, following this guide Service appears to be installed. PS C:\powershell> Get-Service $servicename Status Name DisplayName Stopped PMimagewatcher PMimagewatcher When I try to start it, get this…

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-24T18:41:41.407+00:00
M Smith 21 Reputation points
accepted 2020-08-25T18:55:11.653+00:00
M Smith 21 Reputation points
1 answer

Bulk Modify Attributes

Hell Everyone i created an excel sheet to bulk update some attributes for example Display Name , UPN, Addres , Office Number , Mobile Number, country , city, title, company. But i cannot seem to get a powershell command to work. Would anyone have any…

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,213 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-24T20:54:27.557+00:00
stavros mitchell 56 Reputation points
commented 2020-08-25T15:33:14.69+00:00
Rich Matheisen 45,831 Reputation points
2 answers

How to solve the error message when executing bat automation batch file? B A T C H R E C U R S I O N exceeds STACK limits

How to solve the error message when executing bat automation batch file? B A T C H R E C U R S I O N exceeds STACK limits I wrote a series of automated scripts, but after executing them, error messages will jump. How can I solve him? ****** B A T C…

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
321 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-17T06:19:02.63+00:00
Ru Ru 6 Reputation points
commented 2020-08-25T05:20:33.94+00:00
Sunny Qi 10,926 Reputation points Microsoft Vendor
2 answers

LDAP filter optimization

Hello, I have the following filter to select users from multiple groups. As these groups all have the same parent OU path, is there any way I can simplify this filter to remove the need to remote the common parent path for each sub-group ? Thank you.…

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-24T20:02:31.617+00:00
dave parker 1 Reputation point
answered 2020-08-24T21:39:30.05+00:00
Rich Matheisen 45,831 Reputation points
1 answer

JEA to enable remote user (No Admins) to reboot a system / event id 10016 COM 9CA88EE3-ACB7-47C8-AFC4-AB702511C276

Hi I've tried to use Powershell JEA to enable a group of normal users to run the cmdlet 'restart-computer', but when the user runs the command we get Event ID 1001 in Eventlog. The users are allowed to execute the cmdlets 'restart-computer' and…

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-21T11:44:33.703+00:00
David Scholz 21 Reputation points
commented 2020-08-24T11:56:46.393+00:00
David Scholz 21 Reputation points
1 answer One of the answers was accepted by the question author.

powershell system.object.tostring() problem

Hello everybody, i have to write a powershell script to backup an azure blog storage. I want to send the result as an email. But I don't get the result, but "System.Object []" as the mail body. The script works perfect, I'm able to…

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-23T06:43:24.507+00:00
Guido Jeuken 71 Reputation points
commented 2020-08-23T07:10:22.303+00:00
Guido Jeuken 71 Reputation points
2 answers One of the answers was accepted by the question author.

Create variable with mutiples tables

Hello, I do not know how to phrase that question correctly so I will try with example. Here is the JSON example of what I'd like to recreate in PowerShell format: [ { id : "001", name : "apple", …

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-21T15:26:08.487+00:00
Steven N 96 Reputation points
answered 2020-08-21T18:33:46.357+00:00
Rich Matheisen 45,831 Reputation points
3 answers

Cisco VPN and Folder Redirection

Hello and hope everybody is keeping well in these difficult times. Please could someone help with the following query. Query Summary How can we get folder redirection for desktop, documents, IE favourites etc to work when there are a large…

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,072 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-07-21T17:02:25.647+00:00
Desperate Dan 1 Reputation point
commented 2020-08-21T15:57:00.193+00:00
Vzzzbucks 1 Reputation point
1 answer

Add blank line to top of combobox

I have a combobox showing all security groups in alphabetic order, the code used is: $groups = Get-ADGroup -Filter 'GroupCategory -eq "Security"' | Select-Object -Expand name | sort-object $editusersecgroupentrybox.DataSource = $groups This…

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,213 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-20T15:32:20.883+00:00
Gareth Davies 21 Reputation points
commented 2020-08-21T01:49:45.313+00:00
Rich Matheisen 45,831 Reputation points
2 answers One of the answers was accepted by the question author.

combobox displaying @attribute = value

I have set up a GUI to allow service desk staff to manage accounts. As part of this I want to have a dropdown box listing all the security goups so they don't have to type the group name and path. The combobox is populating with the group names, but…

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,213 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-20T13:20:56.573+00:00
Gareth Davies 21 Reputation points
commented 2020-08-20T19:48:02.317+00:00
Gareth Davies 21 Reputation points
4 answers

How to retrieve all empty OU in all my AD

Hi all I would like to know all empty OU existing on my AD. I found a powershell command line below which retrieve this information: Get-ADOrganizationalUnit -Filter * | ForEach-Object { if (-not (Get-ADObject -SearchBase $_ -SearchScope OneLevel…

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,213 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-05T13:56:23.88+00:00
Mohamed SAKHO 1 Reputation point
answered 2020-08-20T11:59:55.82+00:00
SChalakov 10,371 Reputation points MVP
4 answers

Using variable tor -path value

I am tying to create a Powershell script to create user accounts, not a difficult task normally. However, I have been asked to create a GUI (already done) that allows the person creating the account to enter the users information and hit a button to…

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,213 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-14T17:33:31.42+00:00
Gareth Davies 21 Reputation points
answered 2020-08-20T01:51:33.033+00:00
2 answers

Custom cloum creation

WSUSCL02-2012 Monday, August 10, 2020 5:03:08 PM X Status KB Size Title 2 Accepted KB3172729 10 MB Security Update for Windows Server 2012 R2 (KB... 2 Accepted KB3175024 12 MB…

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-12T12:04:39.537+00:00
prabhat kumar 1 Reputation point
answered 2020-08-20T01:51:16.16+00:00
2 answers

Powershell script windows xp , 7 , 10

Hi ! i made powershell script for create vpn profile on Windows 10 , but this script doesn't work on windows xp , embedded standard and 7 . our pos system still using windows those windows version. and we need using L2TP client vpn of Cisco Meraki , …

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-12T02:00:04.82+00:00
Aaron EOM 0 Reputation points
answered 2020-08-20T01:49:59.037+00:00
2 answers

Runas current user from system account without creditials using powershell

Hi Team i am trying to retrieve the certificate details using powershell for the current users from my application. Application is running in system account and not able to switch current user and retrieve the certificates using powershell invoke…

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-11T06:30:20.117+00:00
Mahendran M 21 Reputation points
answered 2020-08-20T01:49:46.897+00:00
2 answers

Unable to list access list in powerbi workspace using powershell

hi Team, I want to extract the report of Access list of Powerbi workspaces like who has Member\Admin\Contributor\Viewer. Im unable to find the command for that. i pre-assume command should be something like "get-PowerBIWorkspaceUser" but…

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-10T16:52:48.76+00:00
Tarun Marwaha 1 Reputation point
answered 2020-08-20T01:49:22.077+00:00
2 answers

Calling an API from powershell

Hi All. I am trying to write a script that will call an API from powershell 100 times, the equivalent curl script is as follows. curl --location --request GET 'https://my-api-url/224/employee' \ --header 'URN-Token: xxxxxxxxxxxxx' \ --header…

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-09T14:04:51.26+00:00
MrFlinstone 506 Reputation points
answered 2020-08-20T01:49:16.637+00:00
2 answers

file path / name are trancated in powershell

cmd.exe /c powershell.exe Get-FileHash -Algorithm SHA256 -Path (Get-ChildItem '.\Single Cycle*.*') > SHA256_report.txt it does not display full information, e.g. Algorithm Hash …

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
asked 2020-08-06T22:18:36.057+00:00
wjing 1 Reputation point
answered 2020-08-20T01:49:10.437+00:00