Powershell script + SMTP email
Hello, I have the following script edited by my co-worker (it's our IP) with my own personal modification. I have basic skills in powershell so I'm not a master. The goal is to send an email to the user as soon as he hits a 14-day countdown until…
How to set msExchMailboxGuid with Set-ADUser command
Hi all, I get users information (PrimarySMTPAddress,Alias,SamAccountName,FirstName,LastName,DisplayName,Name,ExchangeGuid,ArchiveGuid,LegacyExchangeDn,EmailAddresses) by Get-Mailbox command Then export them to XML file (Export-Clixml) or CSV file…
How to fix the null index array error in powershell?
I am trying to run a PowerShell script which is taking three input PAT, organization and connection string of the database. But, When I run the script I am facing an issue i.e it throws a null index array. Attaching screenshot of the error and script for…
How to change Office language in bulk
We have thousands of users in the Mekong Valley and they have requested to change their Office language. Is there a way to do this within Intune?
seem MS abandoned powershell
Why does is seem like anything that has to do with PowerShell is half assed MS how can you let this happen?
Basic Powershell Azure Connection
OK, I admit, I am behind the curve. I have been using PowerShell and getting my commands to work as a sysadmin for some time, and things were fine. Now I am learning that the latest is PowerShell 7 and PowerShell graph andmy connections are not working…
Powershell check file modified date & send email if updated (only once)
Script sends email if a new file is found in that folder. And does not send email if already been sent. Runs every hour in the windows task scheduler. Can you check the code? Maybe you can tell me how to fix it and optimize it. Thank you. $TodayDate =…
Script to remove all user profiles from a workstation except global user and admin
Hello. I'm looking for help with a script to remove user profiles that have logged into a workstation other than the local Admin and Global users. Thanks.
For SharePoint Online permissions, How to have this checkbox unchecked by default?
Hi there, On SharePoint Online, while grating permissions on a folder, the checkbox to grant permissions on subfolders even if they have unique permissions is checked by default. How to have this checkbox unchecked by default? Any PowerShell, or any…
On SharePoint Online, is there a way to block unique permissions on files and folders (forcing users to use a folder on the top level when new permissions are needed)?
Hi there On SharePoint Online, is there a way to block unique permissions in a document library (so only the top-level folders can have unique permissions, but none of the sub-folders)? When users cannot create unique permissions, they will be forced to…
Howto delete powershell transcript files with intune
Hi there, we have several powershell scripts that are using the command start-transcript to do a kind of debug logging when running via the Intune Management Engine. Those files are stored in the default Intune Folder in…
The term '-SysvolPath' is not recognized..?!
Hi, I have the following Powershell script : $password = ConvertTo-SecureString "Password" -AsPlainText -Force $cred = New-Object System.Management.Automation.PSCredential ("Administrator", $password) Install-WindowsFeature -name…
What is the different between New-MgGroupMember and New-MgGroupMemberByRef?
Hi All, I am curious, what is the difference between using New-MgGroupMember and New-MgGroupMemberByRef? I know how to use them both and I know for New-MgGroupMemberByRef you need to use an Odata bind defined within a hashtable. But why are there…
The value of parameter imageReference.sku is invalid while creating the VM using Azure PowerShell
I'm trying to create a Windows 2016 Datacenter Virtual Machine using Azure PowerShell. Created the Resource Group Created the Storage Account Location is Central India Created the VNet, Subnet Created NSG Rule with NSG Group Created Public IP, VM…
How to obtain Major.Minor.Version.Patch details from PowerShell
Hello everyone, I happen to use following command to obtain operating system version details. cmd /ver The same command cannot be used when called in a PowerShell script like following. Why? because it opens a shell; and control remain stuck there. …
VS-Code loaded project not showing in default project for package manager console NuGet package
I am trying to work on and get a powershell script running that requires the MS Exchange WebServices dll from NuGet, when i try to load the script as a project in VS Code and install the dll as a package from NuGet via the Package Manager Console it…
how do i edit path from variable?
I have in multiple locations text files named pc01; pc02; pc03 and so on up to pc18. I want to go through them in order and get the contant into a single file. here's the script I use for example: $source =…
How to open a word document on another computer remotely using powershell.
There has to be a way to open a Word document onto a remote computer using a PowerShell script. I'm new to PowerShell and I've just been googling how to do things, but I can't find out how to remotely open a word document on another computer using…
How can I use PowerShell Script to extract all engagement and assignment completion data from Class Teams?
Hi there, I would like to extract all engagement and assignment completion data from across all of our class teams in order to delve into this data and incorporate it into our data models on our pupils. Is this possible through PowerShell? If so, i would…
How to use Show-DnsServerCache -CacheScope parameter
i don't know how to use -CacheScope in Show-DnsServerCache command