Home

Windows PowerShell

66 Conversations

Latest Activity

Custom List Message Item

I want to see which users are assigned admin role privileges in O365 for all admin role attributes.... Who can help me to get this report? 

 

 

70 Views
5 Replies

Hello Leighton Brunning,

 

If you are interested in GUI tool then the below tool has an in-built report for finding admin role privileges. (Once installed, navigate to 'R

... Read More

You are not being very specific here, but here's one of the snippets I use for reporting on Admin role assignments:

 

$roles = Get-MsolRole

$arrPermissions = @();$i=0;
f
... Read More

What does your current script look like?

I have a script which I am creating a distribution list (New-DistributionList).  However, the format of the output gets screwed up when the following text appears:

 

New! Office 365 Groups are the next generation of  distribution lists.
Groups give teams sh
... Read More
81 Views
5 Replies

Could you post the script?

 

What you could do is to store the output in a variable, then output it with a small delay.

I currently use the below script to connect to the S&C Center. This does not work with MFA.

I was wondering if there is an Updated Module that I could use that supports modern authentication?

 

$Credential = get-credential -Credential username.com

 

$Session =

... Read More
2,211 Views
36 Replies

The answer is Yes, the new module released for Exchange Online also includes a connection string for accessing the Security and Compliance Center.

 Connect to Exchange Online PowerShell using multi-factor authentication

... Read More

Hi,

 

You can download the latest MFA enabled Powershell from EAC. It contains the cmdlet name connect-IPPSsession which will connect to S&C.

 

2017-08-30_17-48-21.png

Read More

I contacted Microsoft Support today.  This the response

 

"I am aware of this limitation however when I checked in our RoadMap site I don’t see any mentioning of this as a

... Read More

Nope, not yet. It's the last of the "modules" I use to get MFA support :(

Best Response confirmed by Robert Woods (Frequent Contributor)

I created script below and I now want to enhance it as I am getting errors.

# Create the filename with the current date
$filename = ([string]::Format("\\JHBDSM020000128\QlikView\Elijah\Data\Detailed\128_Detailed_FileSystem_{0}.csv", (Get-Date).toString("yyy

... Read More
47 Views
1 Reply

You're problem has to do with the output width length.  By default, it is truncating due to its nature.  A better way is to use a format that preserves data.  Either clix

... Read More

Looking for a (free?) GUI form frontend for scripts that I want to distribute to users.  

 

Basically, I want to gather three or four data points.... such as first name, lastname, domain name,  and country in a GUI form, which then passes these to parameter

... Read More
132 Views
6 Replies

If you're talking about reusable and repeatable, then ShowUI is an interesting choice.  Also, you can go native winforms.  PowerShell studio is a pay-for product, but rea

... Read More

PowerShell supports this natively, you can get the input directly as prompts in the script, or if you want you can build a real UI with buttons and other controls. An eas

... Read More

We are in the process of changing our backup software over to another client. In order for us to do this we need to make some changes to the user profile for chrome browser to enable SSO to work with this software.

 

We can get this to work with a powershel

... Read More
40 Views
1 Reply

Maybe not the answer your looking for, but your security department are wrong and need to learn about real threats. An updated PowerShell engine provides way more securit

... Read More

We are in the process of changing our backup software over to another client. In order for us to do this we need to make some changes to the user profile for chrome browser to enable SSO to work with this software.

 

We can get this to work with a powershel

... Read More
23 Views
0 Reply

Hi,

 

I have the following simple script that works fine, but continually loops once it has finished displaying the necessary information. Does anyone know what I need to change to get it to display the information only once?

 

import-csv .\MailboxUsersPermis

... Read More
53 Views
2 Replies

Your Get-Mailbox will be returning every mailbox in your org, and that will repeat for every $name that's in your mailbox user CSV list.

 

Looks like you should use "Get-Ma

... Read More

Hello,

 

I am new to power shell and i am trying to achive below. I have file test.txt with data as shown below.

i want the search for variable2 and update the value as below.

select * from table1 order by column

Can you please guide me on how to achive this?

 

... Read More
84 Views
2 Replies

How about this?

 

it will

  1. make temporary copy of the file (test.tmp)
  2. read the file line per line
  3. if the line starts with "variable2" (can contain whitespaces around), line con
... Read More

Do you need to run it in powershell trough a txt file or can you run it in a script?

 

You could take a look at this article on how to query SQL from PowerShell:
http://irisclasson.com/2013/10/16/how-do-i-query-a-sql-server-db-using-powershell-and-how-do-i-filter-format-and-output-to-a-file-stupid-question-251-255/

Read More

We have a group of admins that are also trusted to manage our customers through delegated administration.  How can I list all those admins? 

 

The closest I have come is:

 

Import-Module MSonline
$cred = Get-Credential
Connect-MsolService -credential $cred
$del
... Read More
77 Views
0 Reply

A few months ago, we started the journey to bring the PowerShell experience in to Azure Cloud Shell. Today, that experience enters public preview alongside Bash in Azure Cloud Shell.

 

With the addition of PowerShell in Cloud Shell, now you have the flexi

... Read More
144 Views
0 Reply

Hello

I have a windows PowerShell Script that I made to move a folder to anther folder on the same drive. (move-item 'E:\System State Folder' 'E:\Backup Folder') Action : Start a Program, Program/script: PowerShell, Add arguments: -ExecutionPolicy Bypass,

... Read More
405 Views
7 Replies

I wrote a blog post in March on how to use task scheduler to run PowerShell scripts with arguments: https://www.andersrodland.com/powershell-script-with-arguments-as-a-scheduled-task/

Read More

And you might also need to run the script as administrator. In any case, add some logging/debugging capabilities in the script in order to troubleshoot it properly.

Read More

Team ,

 

I need a solution here , I am trying to connect my VM which is running in Hyper-V and I would like to deploy some of the scripts which will run automatically inside the VM and then it will create a text file which I would like to export it to the b

... Read More
102 Views
2 Replies

PowerShell Direct should help you do this. It allows you to run PowerShell from the host inside the VM guests. Windows 10 and/or Server 2016 is required.

 

https://blogs.technet.microsoft.com/virtualization/2015/05/14/powershell-direct-running-powershell-inside-a-virtual-machine-from-the-hyper-v-host/

Read More

https://www.howtogeek.com/117192/how-to-run-powershell-commands-on-remote-computers/

 

Make shure the VM and abse machine are on the same network, that the VM is not set to

... Read More

We have the NAS storage and we are all accessing our users profiles and share profiles from the NAS storage.
We need to restrict the users profiles size below 500 MB thershold, So is it possible to generate the users profile size automated report to each u

... Read More
289 Views
5 Replies
error

Hi,

You can try this script .

$RootFolder = "E:\Profiles"
$paths = Get-ChildItem $RootFolder   
$FolderList =@()
Foreach ( $path in $paths)
{


$colItems = (Get-ChildItem $
... Read More
Best Response confirmed by siva N (Occasional Contributor)

Has anyone had a problem logging into skype for business for Powershell using a domain other than the @domain.onmicrosoft.com?  Every single time I attempt to login it will give an error.  I have had success when it was a client that still had the generic

... Read More
87 Views
2 Replies

Late to the party, but have you tried adding OverrideAdminDomain with your preferred credentials?  You should be able to use your user@domain.com account, but tell it to

... Read More

Works just fine here, and has been working fine for years with custom domain. Any particular error you are getting? Perhaps you have MFA enabled and using older/non-ADAL

... Read More

Here's a fun one...I have about 3500 users licensed with E1.   I have about 700+ of those users who do NOT have Exchange Online Plan 1 activated.   Once those are activated, I will then need to apply an Exchange Online Archive license, and THEN add to my

... Read More
96 Views
2 Replies

To filter out users with some specific service disabled, you can use something like:

 

Get-MsolUser  | ? {$_.Licenses.ServiceStatus | ? {$_.ServicePlan.ServiceName -eq "EXC

... Read More
Best Response confirmed by Simon Wåhlin (MVP)

Hi

 

i need to check when cloud users last logged on so i can do some housekeeping. These are cloud account so can not user exchange reports i have seen only for this

 

I have created this script but just need to get the out also of last logon time or date

 

ge

... Read More
108 Views
1 Reply

Look at the Activity report under O365 Admin center -> Reports -> Usage (or here https://portal.office.com/adminportal/home#/reportsUsage/LicenseActivity). It will give y

... Read More
Best Response confirmed by pardeep soba (Occasional Contributor)

Will this say that Array is not supported by set-CsRGSHolidayset?

DGD_M-QXcAAbMoM.jpg

Read More
189 Views
7 Replies

The error message says that it can't convert your untyped (object[]) array to the required type.

Try to specify the type for array elements:

[Microsoft.Rtc.Rgs.Management.W

... Read More

The right way to add is descibred here: https://technet.microsoft.com/en-us/library/gg398736.aspx

 

The following example is what you are looking for:

$x = New-CsRgsHoliday 
... Read More

I have a mandate from my Director to turn off all new O365 services that are released (if possible) at the user level so they can be turned on at pilot levels for testing before we make available to everyone. This is easily enough done by running a set-ms

... Read More
293 Views
4 Replies

Have you looked into group-based licensing? Almost everyone I show this to abandons their scripted approach, it's pretty good.

 

https://practical365.com/blog/simplifying-office-365-license-control-azure-ad-group-based-license-management/

Read More
Best Response confirmed by Julie Lothrop (Occasional Contributor)

Hi All ,

 

I am unable to remove Hyper V from my client machine using below script . 

For your information , I am running the below script using elevated priviledge..

 

Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All

 

Getting the error

... Read More
94 Views
3 Replies

Have you tried doing it using GUI?

From  the control panel.

I am surprise to see where there is no response from anybody for my query !! 

Hello, 

I wanted to know if there is a script that can send an email when an event is log

164 Views
4 Replies
Here’s how it works:

1) In Event viewer, find the event log you want to watch. Find the event you are looking for and right click it and choose “Attach a Task To this Even... Read More
There plenty of these, just choose :) one of the examples https://gallery.technet.microsoft.com/PowerShell-Script-to-Send-873dc0b6 Read More
https://github.com/AlexanderHolmeset/Skype-for-Business-Automatic-RGS-Holidayset/blob/master/SkypeForBusines_Automatic_RGS_Holiday.ps1
Any idea why i get the output that is on the black shell window? It only stores one day correctly.

Should output like the ... Read More
121 Views
2 Replies

Looks like what my script does is that it creates a bunch of holidaylist.

Need to be like this instead: -Holidaylist($a,$b,$c)

Any idea how i can do that?

 

Read More

I wrote functions to encrypt and decrypt shared passwords. They work great on windows but we need to be able to run them on the Macs too. Part of the voodoo is an RSA cert loaded on each machine that exposes its private key to do the encryption/decryption

... Read More
69 Views
0 Reply

Hi,

 

Disclaimer: I am new to PowerShell, hence why I turn here for your input.

 

Background:

I'm creating a Power BI dashboard based on data exported from the O365 Audit Log. For the moment, I'm not using the recently launched API, but a daily scheduled Power

... Read More
1,487 Views
16 Replies

Have you checked the parameter "SessionCommand" in the Search-UnifiedAuditLog cmdlet?. By using this you can get all the records. But you need to do the filters in the DB

... Read More

What you are looking for I guess is something like a "NOT" operator, which will allow you to exclude all actions from particular user/account. Unfortunately, I'm not awar

... Read More