Microsoft Q&A

Windows Server PowerShell

5,054 questions

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.

Browse all Windows tags

5,054 questions with Windows Server PowerShell tags

Sort by: Updated
1 answer

Powershell Get-SMBOpenFile output question

Hello. I have a script that is running the Get-SMBOpen file command, and outputting the results to a text file. When the ShareRelativePath entry is not long, the following output is shown on-screen: FileId SessionId Path …

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.
2,931 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,054 questions
asked 2023-08-31T16:28:29.8866667+00:00
Kaplan, Andrew H 61 Reputation points
commented 2023-09-01T23:04:10.8533333+00:00
Rich Matheisen 41,341 Reputation points
2 answers

Convert PS1 script to one liner - new scheduled task

Is there a way to convert this script only to 1 line. When I try to open the variables, I get the error. # Create a PowerShell script that contains the Restart-Computer cmdlet $script = "Restart-Computer -Force" $scriptFile =…

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.
2,931 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,054 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
1,197 questions
asked 2023-08-30T10:49:33.23+00:00
Pavel yannara Mirochnitchenko 10,111 Reputation points
commented 2023-09-01T22:55:37.2266667+00:00
Rich Matheisen 41,341 Reputation points
2 answers One of the answers was accepted by the question author.

AIP Custom Permission via Command line argument using C#

Team, Please refer the below PowerShell command to apply custom permission to MS office documents:- PS C:> $permissions = New-AIPCustomPermissions -Users user1@contoso.com, user2@vanarsdel.com -Permissions Reviewer -ExpirationDate (Get-Date -Month 1…

Azure Information Protection
Azure Information Protection
An Azure service that is used to control and help secure email, documents, and sensitive data that are shared outside the company.
441 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
8,809 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,054 questions
asked 2023-08-29T11:33:59.9166667+00:00
Sharma5, Aditya 20 Reputation points
accepted 2023-09-01T21:21:47.1666667+00:00
Sharma5, Aditya 20 Reputation points
1 answer

I get no hash files using Get-FileHash.

I wanted to get file hash in folder mounted to nas, but, I think it works, nothing error happened, but no output generated. PS C:\windows\system32> Get-FileHash -Algorithm SHA512 -Path "\\mynas\something\folder\file.abc"

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,054 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
1,197 questions
asked 2023-08-27T23:20:23.6266667+00:00
523311 20 Reputation points
commented 2023-09-01T12:58:40.3266667+00:00
MotoX80 27,121 Reputation points
2 answers

How would you sign a .jar file using the Azure Key Vault in a Dev Ops Pipeline

The requirements for code signing is that the certificate must be in a HSM based environment. Azure Key Vault is supported, so how does one sign a .jar file when the certificate is in an HSM environment? The certificate is non-exportable.

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
874 questions
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.
2,931 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,054 questions
asked 2023-08-31T01:31:30.6533333+00:00
Rusty Crabbs 25 Reputation points
answered 2023-09-01T08:24:23.6066667+00:00
Akshay-MSFT 8,966 Reputation points Microsoft Employee
1 answer

Get-Nettcpconnection question for remote computer

Hello. I am experimenting with the Get-Netcpconnection command, and I am trying to combine the '-AppliedSetting Internet' option with 'CimSession' in order to get the intended output for a remote system. I am having problems getting the two to work…

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,054 questions
asked 2023-08-31T19:19:32.8566667+00:00
Kaplan, Andrew H 61 Reputation points
edited an answer 2023-09-01T01:40:17.5866667+00:00
Nathan Giannini 161 Reputation points
1 answer

How to sort the values in parameter drop-down menu in Power BI Paginated Report?

I have a text parameter in a Power BI Paginated Report, but the order of the drop down parameter values is scrambled. How to sort the values in parameter drop-down menu (NOT result values) to be in ascending or descending order?

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,502 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
29,627 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,054 questions
asked 2023-08-31T21:50:26.8933333+00:00
Gian 0 Reputation points
answered 2023-09-01T01:28:38.7566667+00:00
AniyaTang-MSFT 8,736 Reputation points Microsoft Vendor
3 answers One of the answers was accepted by the question author.

How count al items individuelle

Hello Pls, I have : $array = "ich ich du du du ich ich du du du ich ich du du du" | group # or any txt How count all items individuelle ? Like ? : ich = 6 du = 9 Thank for your help Arnold

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,054 questions
asked 2023-08-31T18:04:26.9033333+00:00
a a 41 Reputation points
accepted 2023-08-31T20:45:26.72+00:00
a a 41 Reputation points
1 answer

how can i re-download microsoft store?

Hi, every time I try to open my MS store, it doesn't open, and when i try to re-install it from PowerShell, it stays on "Initializing" or "processing." when I run the command wsreset, it tells me I have to download an application 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,054 questions
asked 2022-01-16T18:39:21.107+00:00
ok ok 1 Reputation point
commented 2023-08-31T15:17:20.18+00:00
Sandy Buerkle 0 Reputation points
1 answer

Need a PS command to give me a list of suspended accounts there the IPphone field is not null or blank

Need a PS command to give me a list of suspended accounts there the IPphone field is not null or blank

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
4,747 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,054 questions
asked 2023-08-31T11:55:08.0166667+00:00
Komendat Jason 1 Reputation point
answered 2023-08-31T14:55:09.2333333+00:00
Rich Matheisen 41,341 Reputation points
2 answers One of the answers was accepted by the question author.

PowerShell Script needing to pull "Date Modified" on folder properties

Hi All, I am working on a PowerShell script that needs to export to CSV file all folders that are up to 3 levels deep The script needs to pull the permissions from the folder as well as the Last date modified of the folder. I have 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,054 questions
asked 2022-08-26T19:55:58.65+00:00
Martin B 86 Reputation points
commented 2023-08-31T14:42:02.6466667+00:00
Rich Matheisen 41,341 Reputation points
3 answers

The attempted operation is prohibited because it exceeds the list view threshold

Hi, I am trying to create a bulk folder list to a Shared Documents/subfolder1 on Sharepoint Online but i keep getting the threshold error. There were 3790 already there with files inside them and i did attempt to upload 4993 new folders but it started…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
7,844 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,054 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
1,197 questions
asked 2023-08-14T14:06:27.9833333+00:00
Imran Shabir 21 Reputation points
commented 2023-08-31T06:23:36.44+00:00
RaytheonXie_MSFT 23,006 Reputation points Microsoft Vendor
0 answers

Install and setup SMTP on a windows server using Powershell DSC

I am currently using Azure Automation State configuration (DSC) to setup a SMTP server. Installing the feature has been fine but I cant seem to find how to configure the SMTP settings such as the virtual server, relay info etc. So I'm wondering if anyone…

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
922 questions
Windows Server Management
Windows Server Management
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Management: The act or process of organizing, handling, directing or controlling something.
382 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,054 questions
asked 2023-08-02T20:00:20.2633333+00:00
Jessey Clarke 21 Reputation points
commented 2023-08-31T04:33:00.2033333+00:00
tbgangav-MSFT 8,591 Reputation points
3 answers

Policy is not applying

Hi All I am using exchange hybrid environment. We create users in onprem and migrate to online. i have a csv file in the below format. When user is added to an onprem AD group(MyADGroup1), i want TeamsAppPermissionPolicy (TeamsAppPermPolicy1) and…

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
7,424 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
7,844 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
3,629 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,315 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,054 questions
asked 2023-08-24T22:24:52.61+00:00
Glenn Maxwell 8,386 Reputation points
answered 2023-08-30T21:38:52.84+00:00
Glenn Maxwell 8,386 Reputation points
1 answer

Find Azure users who have not signed in within 90 day's / Inactive users.

Looking to list all inactive users using powershell. Ive tried many methods such as Get-Aduser etc. but I always find recent users within the list. Looking to query Azure AD so I can also get cloud accounts Ive arrived at below. $users = Get-AzureADUser…

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
16,218 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,054 questions
asked 2023-04-28T15:39:57.76+00:00
Synthetic-Sentience 1 Reputation point
commented 2023-08-30T21:00:24.0833333+00:00
Eric Pritchett 0 Reputation points
3 answers

0x800b0109 - A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider

I have a Windows 7. How can I install MS PowerBI Desktop Setup? I tried several fixes for the error, none seam to work. 0x800b0109 - A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider One of…

Windows 7
Windows 7
A Microsoft operating system.
423 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,054 questions
asked 2023-08-29T03:14:40.8333333+00:00
emma morales 0 Reputation points
answered 2023-08-30T19:44:55.5866667+00:00
Spanjokus 21 Reputation points
2 answers One of the answers was accepted by the question author.

Unable to update log on credential of service via powershell

Powershell verision is 5.1 i am able to update the username and password manually of a server. I am unable to achieve that through powershell. tried the below. am getting return value 15 when i start $account = "<the account name>"…

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,906 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,054 questions
asked 2023-08-25T13:51:25.48+00:00
Deepa Annie 20 Reputation points
accepted 2023-08-30T14:18:53.18+00:00
Deepa Annie 20 Reputation points
4 answers

How to report the size of a cluster shared volume in PowerShell?

I need to know the size of Azure Stack HCI cluster shared volumes, and because I found no better command, I started with: $a = get-clustersharedvolume -cluster 'clu' -name 'vol' $a | format-list -property * One of the properties I think is the one that…

Azure Stack HCI
Azure Stack HCI
A hyperconverged infrastructure operating system delivered as an Azure service that provides security, performance, and feature updates.
196 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,054 questions
asked 2023-08-10T13:17:49.03+00:00
Hinterleitner Andreas 0 Reputation points
commented 2023-08-30T11:21:58.9233333+00:00
Trent Helms - MSFT 1,581 Reputation points Microsoft Employee
2 answers

Unable to connect to a sharepoint site from powershell

Hi, I am trying to connect to a sharepoint site from powershell using this command Connect-PnpOnline -ClearTokenCache -SPOManagementShell -Url $SiteUrl when I run this command it is giving two popups Microsoft login popup Site login popup After…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
7,844 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,188 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,054 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
1,197 questions
asked 2023-08-14T08:28:28.08+00:00
Hirdesh Baghel 20 Reputation points
commented 2023-08-30T09:55:49.1266667+00:00
Emily Du-MSFT 33,141 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

Folder size and date Using PowerShell instead of 3rd party mentioned below

Please assist on following 2: 1. I want to all folders size ( which consist nested folders ) in side the main folder. I have found below one. But is there any Microsoft supported tool to achieve 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,054 questions
asked 2023-08-29T16:24:47.78+00:00
sns 8,846 Reputation points
accepted 2023-08-30T09:05:12.9133333+00:00
sns 8,846 Reputation points